Commit Graph

553 Commits

Author SHA1 Message Date
Zhiyi Zhang 20336127a4 winemac.drv: Trace display device counts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-25 16:28:27 +02:00
Francois Gouget 98b1d68aac winemac.drv: Avoid an unneeded lstrlenW() call.
Note that since tiptext is a buffer it cannot be NULL.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-09 16:25:56 +02:00
Zhiyi Zhang 0d23ecd9ec winemac.drv: Fix build with older macOS SDKs.
macOS SDKs older than 10.11 doesn't support Metal.
macOS 10.11 and 10.12 SDK support Metal but don't
support registryID in MTLDevice protocol. Recommend
using 10.13+ SDK.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-03 12:16:04 +02:00
Zhiyi Zhang 792521f33b winemac.drv: Use generic EnumDisplayMonitors and GetMonitorInfo.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-30 20:07:42 +02:00
Zhiyi Zhang b8415e0310 winemac.drv: Handle display device change events.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-30 20:07:39 +02:00
Zhiyi Zhang 83a2ff33b3 winemac.drv: Add monitor initialization functions.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-30 20:07:36 +02:00
Zhiyi Zhang 039a7715f3 winemac.drv: Add adapter initialization functions.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-30 20:07:33 +02:00
Zhiyi Zhang 0699089f0e winemac.drv: Support GPU initialization via Metal.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-30 20:07:28 +02:00
Zhiyi Zhang d8d1fe486b winemac.drv: Add GPU initialization functions.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-30 20:07:24 +02:00
Akihiro Sagawa e54f1cf9fb winemac.drv: Indicate whether the drop point is non-client area.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-29 21:50:16 +02:00
Akihiro Sagawa ea287aefed winemac.drv: Translate the WM_DROPFILES point into client coordinates whenever possible.
This is winemac.drv port of 846a8f6c8d.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-29 21:50:13 +02:00
Akihiro Sagawa 4c6aa8b2fa shell32: Fix return value for DragQueryPoint.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47514
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 20:42:57 +02:00
Alexandre Julliard 4a902de213 gdi32: Make GDI driver functions cdecl.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-06 21:47:58 +02:00
Aric Stewart bb501445f1 winemac.drv: Send state change notifications from ImeSelect.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 09:46:13 +02:00
Zhiyi Zhang 019f9222a6 winemac.drv: Activate window when restoring from iconic state.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-10 19:42:38 +02:00
Michael Stefaniuc 3e08574461 winemac.drv: Avoid casts from COM objects to interfaces.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-03 22:33:30 +02:00
Aric Stewart 6d05fae6f7 winemac.drv: Use NI_COMPOSITIONSTR/CPS_CANCEL when composition string is empty.
This sends the expected WM_IME_ENDCOMPOSITION message.

Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-28 21:58:33 +02:00
Aric Stewart db3864e5b3 winemac.drv: Allow mac IME to clear text in system input method.
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-06 13:19:32 -05:00
Aric Stewart 3736c36736 winemac.drv: Set done if macdrv_process_text_input is not processing input.
Prevents an input lockup in this case.

Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-06 11:36:54 -05:00
Stefan Dösinger f5e00b0a3e winemac: Add +fps support for Vulkan.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 22:23:58 +02:00
Akihiro Sagawa 1128587fd2 gdi32: Implement GetCharWidthInfo().
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-09 15:46:03 +02:00
Alexandre Julliard 3d6febc997 include: Get rid of the DPRINTF() macro.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 19:34:44 +02:00
Nikolay Sivov 702c73626a winemac: Fix typo in comments.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-09 02:09:55 +01:00
Ken Thomases 654b27823d winemac: Fix failure to render OpenGL on macOS 10.14 (Mojave).
For programs linked against the macOS 10.14 SDK, Mojave makes all view
hierarchies layer-backed.  For views to which OpenGL contexts have been
attached this caused a regression where they sometimes failed to render and
just remain black.  Updating the OpenGL context after the framework has
assigned a layer to our view works around the problem.  Thanks to Elviss
Strazdins on Stack Overflow for the solution
<https://stackoverflow.com/a/52938517/1312143>.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-07 22:45:03 +01:00
Ken Thomases 40c5184a90 winemac: Fix implementation of the AllowVerticalSync registry setting.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-03 19:15:44 +01:00
Ricky Zhou f621baa00f winemac: Allow Command to be mapped to Ctrl.
Adds the following registry options, which configure the Mac driver to
map Command to Ctrl:

HKEY_CURRENT_USER\Software\Wine\Mac Driver\LeftCommandIsCtrl
HKEY_CURRENT_USER\Software\Wine\Mac Driver\RightCommandIsCtrl

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35351
Signed-off-by: Ricky Zhou <ricky@rzhou.org>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-17 15:37:19 +02:00
Alexandre Julliard dc6f39ac29 server: Use screen coordinates in the update_window_zorder request.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-27 15:16:45 +02:00
Ken Thomases f0ad5b5c54 winemac: Use fallback implementation for screen dimensions in GetDeviceCaps().
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-23 23:28:03 +02:00
Michael Stefaniuc d94de38f45 winemac.drv: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 08:51:50 +02:00
Michael Stefaniuc 81e7ecfa80 winemac.drv: Print the debug string and not the pointer to it.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 09:41:09 +02:00
Józef Kucia adb926d5a5 winevulkan: Generate get_vulkan_driver_*_proc_addr() helper functions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 21:28:45 +02:00
Józef Kucia 0cbbab9dac winemac: Add missing entries to vulkan_funcs.
MoltenVK doesn't implement VK_KHR_device_group.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 21:28:45 +02:00
Józef Kucia f59925416a winevulkan: Remove vkAcquireNextImageKHR() from Vulkan driver functions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 21:28:45 +02:00
Ken Thomases 250944b643 winemac: Disable macOS's App Nap energy-saving feature by default for Wine GUI processes.
App Nap defers timer firings and I/O if the app is not visibly or audibly
updating.  An app is supposed to disable it during user-requested or background
activity, but we can't know when the Windows app is engaged in such.  Since it's
not generally acceptable for timers or IO to be deferred, we have to disable it
at all times.

The user can re-enable it by setting the following registry setting:

[HKEY\Software\Wine\Mac Driver]
"EnableAppNap"="y"

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 09:20:10 +02:00
Ken Thomases 650997d71d winemac: Interpret Windows bitmap data, especially window surfaces, as sRGB.
This makes the display match that of native apps.  For example, the UI of Mac
Steam vs. Windows Steam or a PNG shown in iexplore.exe vs. Preview.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 09:19:55 +02:00
Ken Thomases ed7e057388 winemac: Don't change the window's color space.
This was originally done to improve performance at the expense of visually-
correct rendering.  I've reconsidered that trade-off.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 09:19:46 +02:00
Andrew Eikum 10035f1b97 winemac: Implement Vulkan driver on top of MoltenVK.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-13 17:20:43 +02:00
Ken Thomases 357017cd87 winemac: Implement WineMetalView class.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-13 17:20:43 +02:00
Ken Thomases e27abb0a3a winemac: Extract a new class, WineBaseView, to be the superclass of WineContentView and future view classes.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-13 17:20:43 +02:00
Zebediah Figura 60edba563b winemac.drv: Wake up the display on user input.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-06 19:44:26 +02:00
Ken Thomases 64704bef18 winemac: Fix z-ordering between two child (owned) windows of the same parent (owner).
The window being ordered was first put in the correct place and then was moved
to the other end of the children list by the loop that was intended to adjust
the windows strictly between the window and the ancestor.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-22 00:05:13 +02:00
Ken Thomases 09bf88092d winemac: Transform the process to a GUI app on an attempt to change the display mode.
It had only been done when a window is shown.  Some games change the display
mode before showing their first window.  Following Mac conventions, the Mac
driver does not apply display mode changes when it's not the active GUI app.
If such a game were to change the mode and then query display-mode-related info,
it would get info for the original mode, not the requested mode.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-14 23:51:58 +02:00
Ken Thomases 041f59350c winemac: Reenable window autodisplay when the frame is set and redisplayed.
Cocoa will draw the window frame immediately but if autodisplay of its content
view is disabled, that may leave the content area black briefly.  This change
avoids that flicker.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-26 11:28:49 +02:00
Roderick Colenbrander 3de61a9dd9 winevulkan: Define vulkan driver interface.
Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com>
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-27 12:47:16 +01:00
Ken Thomases 5f80cc43bf winemac: Stop the display link after 2 seconds of idleness, not the first time it's idle.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-08 10:56:58 +01:00
Ken Thomases 4e9c3444fb winemac: Leave a window in auto-display mode when it doesn't yet have a display link.
This fixes an issue where some windows (on some systems) would never display
their content area.  If they had a title bar, they'd just display that and
nothing else.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-08 10:56:54 +01:00
Ken Thomases fd6f2a1781 winemac: Check the display link running state as well as the window count to decide whether to start/stop it.
The display link may be stopped even if there are associated windows, due to
idleness.  So, it may need to be started when a window is added even if it's
not the first window.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-08 10:56:33 +01:00
Ken Thomases b019c918eb winemac: Fix test for simple non-restrictive window region optimization.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-27 16:15:25 +01:00
Akihiro Sagawa 4adfb1be29 user32: Send WM_IME_CHAR messages from DefWindowProc.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-16 21:48:49 +01:00
Akihiro Sagawa fdd376e514 winemac: Keep the result string in the IME UI window procedure.
This is winemac.drv port from winex11.drv.
Please refer to b8dc1e7cde.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-16 21:48:48 +01:00