Commit Graph

608 Commits

Author SHA1 Message Date
Zebediah Figura 46c4facab7 winemac: Send systray messages with SendNotifyMessage().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50441
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 11:02:04 +01:00
Zebediah Figura d91a87cea2 include: Fix the definition of NOTIFYICON_VERSION[_4].
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 11:02:00 +01:00
Brendan Shanks 5fbd40520d winemac.drv: Handle non-PCI GPUs correctly.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-28 09:42:58 +01:00
Brendan Shanks ae319caa3b winemac.drv: Use Metal to get a display's GPU info if possible.
Fixes an Apple Silicon issue where CGDisplayIOServicePort() returns
a fake AMD GPU "compatibility" node rather than the real GPU node.

Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-28 09:42:55 +01:00
Georg Lehmann c1824d578a winevulkan: Fix surface functions if they aren't called by winevulkan.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50549
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-26 21:58:13 +01:00
Georg Lehmann d9c9b5ea61 winevulkan: Wrap VkSurfaceKHR in winevulkan.
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-01-22 21:39:23 +01:00
Jan Sikorski 88220e0ee4 winemac.drv: Include depth32+stencil pixel formats in enumeration.
This is especially important for M1 GPUs as they don't support the 24/8 format.

Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-18 22:46:37 +01:00
Alexandre Julliard 6ca76dc5e7 include: Remove some no longer used Unicode functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-02 15:38:25 +01:00
Matteo Bruni f2cfd63cda winemac: Update the stored display settings immediately.
Instead of after sending the WM_MACDRV_UPDATE_DESKTOP_RECT
message. Specifically ddraw reacts to the followup messages and
expects to get the new display rects inside the message handler.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-04 09:07:03 +01:00
Zhiyi Zhang ce9aaf3f42 winemac.drv: Send HTMENU instead of HTCAPTION to query window activation.
Equivalent of cfcc280905 for winex11.drv.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-30 10:35:05 +01:00
Brendan Shanks 863683342d winemac: Remove unused GetCurrentProcess() call.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-12 22:11:09 +02:00
Zhiyi Zhang 40d3b9469d winemac.drv: Fix monitor_id_fmtW variable name typo.
Spotted by Matteo.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-30 16:55:37 +02:00
Rémi Bernon b16f552e19 gdi32: Use explicit CDECL in window_surface_funcs.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 11:30:00 +02:00
Brendan Shanks 0ead40dc9b winemac.drv: Don't fail GPU detection if some IOKit properties are missing.
Fixes GPU detection when running in VMware Fusion, where the GPU entry
lacks a "model" property.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49774
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 22:36:13 +02:00
Brendan Shanks 7eddd79e4e winemac.drv: Print error when no GPUs are detected.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 22:36:13 +02:00
Zhiyi Zhang 580024c684 winemac.drv: Initialize new display device registry display settings.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 21:38:50 +02:00
Zhiyi Zhang 6185252bbc winemac.drv: Zero initialize DEVMODE before passing it to EnumDisplaySettings().
EnumDisplaySettings() on Wine does not write beyond the end of DEVMODE because it doesn't use
dmDriverExtra currently, but this implementation detail should not be relied on.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 18:07:02 +02:00
Brendan Shanks 7aa2601f94 winemac.drv: Fix warnings for constants deprecated by macOS 10.12.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-27 23:28:16 +02:00
Brendan Shanks f9dc364b4e winemac.drv: Fix warnings for constants deprecated by macOS 10.14.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:48 +02:00
Brendan Shanks 737c54dca0 winemac.drv: Build cocoa_window.m with GL_SILENCE_DEPRECATION.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:48 +02:00
Zhiyi Zhang 6b6a7124a6 winemac.drv: Support multiple adapter display settings in registry.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 16:27:24 +02:00
Zhiyi Zhang 13e3d8f635 winemac.drv: Use helpers to get and release display device init mutex.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 16:27:24 +02:00
Zhiyi Zhang ca1d31fc3b winemac.drv: Use the default frequency in ChangeDisplaySettingsExW() if dmDisplayFrequency is 1.
0 or 1 in dmDisplayFrequency means to use the default frequency.

Fix Disgaea PC and Ostriv failing to launch in exclusive fullscreen mode.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-12 17:16:25 +02:00
Zhiyi Zhang 343043153b winemac.drv: Set DM_POSITION and DM_DISPLAYORIENTATION when reporting registry display settings.
Set DM_POSITION and DM_DISPLAYORIENTATION when calling
EnumDisplaySettings(ENUM_REGISTRY_SETTINGS). DM_DISPLAYFIXEDOUTPUT
is not set because it is not necessarily reported according to tests.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-10 22:40:56 +02:00
Brendan Shanks 988d31b696 winemac.drv: Ensure output IDs are unique for mirrored displays.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-10 22:40:53 +02:00
Gijs Vermeulen 3c86adab76 winemac: Cast buffer to const WCHAR* in insert_clipboard_format.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Ken Thomases 1216453225 winemac: Fix a string format warning for tick counts in update_clipboard().
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Brendan Shanks b582ab26f9 winemac.drv: Set output id property for monitors.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:31 +02:00
Brendan Shanks c36e26f41d winemac.drv: Set GPU LUID property for monitors.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:31 +02:00
Zhiyi Zhang f1e7d5bbd6 user32: Fake success for detaching adapters.
It is currently unsupported. This helps later patches so that
settings handlers using a new interface can be introduced without
detaching adapter support, making patches smaller.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 16:20:06 +02:00
Zhiyi Zhang 411fe4f1c3 winemac.drv: Fake success for changing non-primary adapter settings.
Changing non-primary adapter settings is currently unsupported. Return
success for non-primary adapter settings changes so that the primary
adapter settings don't get changed unintentionally.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 16:19:57 +02:00
Zhiyi Zhang 8a4ec0addb user32: Handle NULL device and mode parameters in ChangeDisplaySettingsExW().
NULL device and mode parameters mean to restore all adapters to their
registry settings. Since all user graphics drivers only support a
primary adapter now, it's okay to restore only the primary adapter.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 16:19:49 +02:00
Chip Davis a55320f00b winemac.drv: Use InitOnceExecuteOnce to initialize OpenGL.
Currently, there is a race condition where if two threads call into
OpenGL at the same time, one of them will initialize OpenGL, but the
other will barrel on ahead, thinking GL is already initialized, even
though the first thread hasn't finished initializing it yet. One of the
symptoms of this is that no pixel formats appear to be available,
because the first thread hasn't yet enumerated the available pixel
formats.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 21:28:30 +02:00
Gijs Vermeulen 4475524e59 winemac: Add default case in isMouseMoveEventType.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 22:07:32 +02:00
Alexandre Julliard b0e2d046fc opengl32: Make wgl driver entry points WINAPI.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-23 13:33:20 +02:00
Zhiyi Zhang 31b112e718 winemac.drv: Allocate LUID for GPUs.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 08:57:19 +02:00
Chip Davis e589516432 winemac.drv: Build with GL_SILENCE_DEPRECATION.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-08 14:58:46 +02:00
Alexandre Julliard 73effb1ab6 winemac: Use standard dlopen() instead of the libwine wrappers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-07 14:26:20 +02:00
Brendan Shanks 086c686e81 winevulkan: Enable VK_KHR_get_surface_capabilities2.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-07 14:26:19 +02:00
Chip Davis c66b51b36a winemac.drv: Build with GL_SILENCE_DEPRECATION.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-07 14:26:19 +02:00
Rémi Bernon 062ce94fd5 winemac.drv: Remove frame when non-client area is empty.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46857
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 13:22:31 +01:00
Ken Thomases 3deae92a6f winemac: Only call -[NSOpenGLContext update] from the main thread.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-11 22:58:45 +01:00
Piotr Caban da1e666f57 winemac: Handle dummy_surface in get_mac_surface.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-11 22:58:42 +01:00
Piotr Caban c4becb85f1 winemac: Fix leaks in macdrv_surface_destroy.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-04 20:10:05 +01:00
Zhiyi Zhang 981fb4edb3 user32: Move ChangeDisplaySettingsExW() common code to user32.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-10 22:46:22 +01:00
Chip Davis 1eba86fccc winemac.drv: Support VK_EXT_metal_surface.
Prefer it to VK_MVK_macos_surface when present.

MoltenVK has deprecated VK_MVK_macos_surface in favor of
VK_EXT_metal_surface. It's likely that the former extension will vanish
at some point.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-18 20:54:37 +01:00
Chip Davis 606424bbbc winemac.drv: Pass the CAMetalLayer to MoltenVK.
It isn't safe to access the view object from any thread other than the
main thread. In fact, if you try to call vkCreateMacOSSurfaceMVK() from
any other thread, MoltenVK prints out a big, scary warning telling you
not to do this! Instead, get the layer from the view ourselves and pass
that to MoltenVK. Recent versions of MoltenVK can accept either the view
or the layer.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-18 20:54:34 +01:00
Ken Thomases 1261589c2c winemac: Only manipulate an NSOpenGLContext's view on the main thread.
I was seeing a crash due to an assert about manipulating it on a
background thread. I can't recall where I was seeing that. I think it's
new in Catalina.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Francois Gouget f7de43a173 winemac.drv: Fix the spelling of a couple of comments.
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-12-11 21:51:28 +01:00
Gijs Vermeulen 8cd44ecf4c winemac: Avoid some compiler warnings.
Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00