Commit Graph

662 Commits

Author SHA1 Message Date
Tim Clem 9913f27862 winemac.drv: Remove extraneous CGEventTapIsEnabled check.
We no longer enable or disable the event tap manually, and it re-enables
itself on kCGEventTapDisabledByTimeout, so this check is not needed.

Signed-off-by: Tim Clem <tclem@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-20 20:12:10 +02:00
Tim Clem 5e543fee7a winemac.drv: Stop cursor clipping when all windows are minimized.
There's no analogous state on Windows, where an app is focused but has no
visible windows, but this seems like the best behavior.

Signed-off-by: Tim Clem <tclem@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-20 20:12:08 +02:00
Tim Clem 184048042e winemac.drv: Stop cursor clipping when a window is resized by dragging.
Testing on Windows confirms this behavior.

Signed-off-by: Tim Clem <tclem@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-20 20:12:06 +02:00
Tim Clem 2407f9b84e winemac.drv: Stop cursor clipping when the app deactivates.
Testing on Windows confirms this behavior.

Signed-off-by: Tim Clem <tclem@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-20 20:12:04 +02:00
Tim Clem 325cc98d7d winemac.drv: Simplify cursor clipping code paths.
Centralizes all clipping behavior into -startClippingCursor: and
-stopClippingCursor.

Signed-off-by: Tim Clem <tclem@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-20 20:12:01 +02:00
Zhiyi Zhang bb5b1d7554 winemac.drv: Pass size in bytes to RegQueryValueExW().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-20 11:22:19 +02:00
Zhiyi Zhang 5b7397bb27 winemac.drv: Set hkey to NULL after RegCloseKey() in macdrv_init_gpu().
Although it's unlikely, RegCloseKey() may close an already closed key if
the following SetupDiGetDeviceRegistryPropertyW() failed.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-19 11:33:05 +02:00
Zhiyi Zhang d275e68dc6 winemac.drv: Add GPU hardware information values to the registry.
Based on a patch by Dmitry Timoshkov.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-19 11:33:05 +02:00
Piotr Caban 30c6ab463f winemac.drv: Silence ImeSetActiveContext fixme.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-15 21:06:27 +02:00
Jacek Caban 6342e9217d gdi32: Remove unused argument from CreateDC driver entry point.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-29 21:38:12 +02:00
Alexandre Julliard 6ba7773121 makefiles: Add a -mcygwin flag to specify the inverse of -mno-cygwin.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +02:00
Zhiyi Zhang 0ed105fb00 winemac.drv: Register GUID_DEVINTERFACE_MONITOR interface for monitors.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Zhiyi Zhang 5a804af79b winemac.drv: Register GUID_DISPLAY_DEVICE_ARRIVAL interface for GPUs.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Zhiyi Zhang 9a370223ab winemac.drv: Register GUID_DEVINTERFACE_DISPLAY_ADAPTER interface for GPUs.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Tim Clem a45bb014e8 winemac.drv: Remove now-unnecessary drag stop event on mouse up.
This approach was added by 5cf64084fb to work around changes to
event behavior in macOS Catalina, 10.15. However, more reliable
notification center messages for dragging are available on 10.12+,
making this path unnecessary.

Signed-off-by: Tim Clem <tclem@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 09:44:25 +02:00
Tim Clem bb28d54d08 winemac.drv: Use window drag notifications when available.
When running on macOS 10.12+, there are private notification center
messages we can use to reliably detect when a window is being
dragged by its titlebar. These are less finicky than the current
combination of an undocumented event subtype and a left mouse up.

Signed-off-by: Tim Clem <tclem@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 09:44:22 +02:00
Jacek Caban 01fdc50fa2 gdi32: Remove no longer used printer config driver entry points.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-13 19:57:29 +02:00
Tim Clem b5deeff860 winemac.drv: Allow cycling of windows with Cmd+`.
We already set up the Window menu and set the relevant bits in
collectionBehavior, but windows must respond YES to
-canBecomeKeyWindow in order to actually be activated by Cmd+`
window cycling.

Signed-off-by: Tim Clem <tclem@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-10 09:00:21 +02:00
Jacek Caban 6403e88140 gdi32: Use GetICMProfile driver entry point for EnumICMProfilesW.
When display ICM is not explicitly configured on Windows, GetICMProfile
returns the default profile, but EnumICMProfiles does not enumerate
anything. For non-default configuration, EnumICMProfiles returns
configured profiles.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 19:31:22 +02:00
Jan Sikorski 0d22e8455a winemac.drv: Omit WM_ENTER/EXITSIZEMOVE on non-interactive window changes.
The motivating example is when a newly created window gets moved off the system
menu bar. A program might not be prepared to handle these messages yet.

Fixes a crash in Lord of the Rings online.

Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-06 18:00:41 +02:00
Chip Davis 3f845b34de winemac.drv: Remove now unused -[WineContentView drawRect:].
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-01 17:10:09 +02:00
Chip Davis 9e599a89e3 winemac.drv: Set the surface contents directly to the layer.
Use a top-down DIB for the surface instead of a bottom-up DIB. This
seems to match better with how Core Graphics expects to receive image
data, and allows us to avoid a transform to flip the surface image.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-01 17:10:05 +02:00
Chip Davis cad2a7c8e1 winemac.drv: Move GL context update code to -viewWillDraw method.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-01 17:10:00 +02:00
Chip Davis 01f027b2db winemac.drv: Use a mask layer to support window regions.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-01 17:09:43 +02:00
Chip Davis a5cf847aa4 winemac.drv: Enable layer-backed views.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-01 17:09:41 +02:00
Georg Lehmann 6dee57f30e winemac.drv: Only return vulkan functions if the host function is available.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-20 20:51:58 +02:00
Jacek Caban 37a5c8b9f3 gdi32: Use NtGdiWidenPath for WidenPath.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-19 12:38:07 +02:00
Jacek Caban 817f116e95 gdi32: Remove no longer used driver entry points.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-18 18:41:40 +02:00
Jacek Caban 3057388ff8 gdi32: Remove no longer used driver entry points.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-17 18:16:49 +02:00
Zhiyi Zhang 4a6fb0307b winemac.drv: Use length returned from sprintfW().
A minor optimization.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-17 11:44:18 +02:00
Jacek Caban eeecc2a39a gdi32: Remove no longer used driver entry points.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-13 14:15:27 +02:00
Jacek Caban bd89417c9e gdi32: Remove no longer used driver entry points.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-10 11:00:18 +02:00
Jacek Caban 5c1bbc4014 gdi32: Remove no longer used driver entry points.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-06 19:58:50 +02:00
Jacek Caban 3f2850aeaa gdi32: Remove no longer used driver entry points.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-05 23:11:23 +02:00
Jacek Caban 48cd631413 gdi32: Remove no longer used clipping driver entry points.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Jacek Caban eefca28ed3 gdi32: Don't use driver entry point for NtGdiSaveDC implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-30 14:27:22 +02:00
Jacek Caban 626afcad71 gdi32: Remove no longer used driver entry points.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-29 15:40:44 +02:00
Jacek Caban e13e935be3 gdi32: Remove no longer used driver entry points.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-28 22:07:05 +02:00
Jacek Caban 1f5cc0e5ef gdi32: Remove no longer used Polygon and Polyline driver entry points.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:20:50 +02:00
Rémi Bernon 454712a94d user32: Add a default WindowPosChanging implementation.
Which creates an off-screen window surface for top-level non-layered or
SLWA-layered windows.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-20 21:48:57 +02:00
Rémi Bernon 07b9f3f609 user32: Factor IsRectEmpty driver check in ShowWindow.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 20:37:04 +02:00
Stefan Dösinger 004b1179e9 winemac.drv: Set view.WantsBestResolutionOpenGLSurface.
This used to default to false before Catalina, and it still does so when
the application is built with XCode 10 or earlier. When building with
XCode 11 or later Catalina and newer will create a high DPI GL view even
if the window is low dpi. Because we don't adjust glViewport parameters
(and glDrawPixels, etc) we render only to the lower left quadrant.

Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-12 16:56:27 +02:00
Rémi Bernon c4e6d16271 user32: Factor GetKeyboardLayoutNameW implementations.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-06 19:50:40 +02:00
Rémi Bernon e2aa30f21d user32: Factor GetKeyboardLayout and remove driver call.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 21:57:53 +02:00
Rémi Bernon da9fc41814 user32: Factor ActivateKeyboardLayout previous layout logic.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 21:57:04 +02:00
Rémi Bernon db901b91ef winemac.drv: Call ActivateKeyboardLayout when layout changes.
To update user32 current keyboard layout as well.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 21:56:36 +02:00
Rémi Bernon f044f401f7 user32: Factor unsupported cases into ActivateKeyboardLayout.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-03 21:08:23 +02:00
Rémi Bernon 123c17aa92 user32: Add RAWINPUT parameter to __wine_send_input.
And send_hardware_message.

This makes it possible to use __wine_send_input to send extended input
data, such as HID device notifications and WM_INPUT messages carrying
HID reports.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 10:37:52 +02:00
Piotr Caban 1c1c78b2c6 winemac.drv: Fix setting DISPLAY_DEVICE_ATTACHED_TO_DESKTOP flag on adapters.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-13 17:33:38 +02:00
Piotr Caban 66b593049c winemac.drv: Take all online monitors into account when computing desktop rect.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:35:56 +02:00