1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00
Commit graph

516 commits

Author SHA1 Message Date
Rémi Bernon
4573910acc win32u: Move D3DKMT vulkan implementation out of winex11. 2024-03-26 22:46:05 +01:00
Rémi Bernon
28873ce8c4 win32u: Move vulkan loading and init guard out of the drivers. 2024-03-22 17:05:31 +01:00
Rémi Bernon
00a541d6a0 win32u: Move D3DKMT VidPn* functions out of winex11. 2024-03-13 18:28:49 +01:00
Rémi Bernon
0f1322d2df winex11: Support XInput2 events on individual windows. 2024-03-06 19:03:26 +01:00
Rémi Bernon
0d969b1764 winex11: Remove now unnecessary create_info HWND checks. 2024-02-21 22:30:31 +01:00
Rémi Bernon
165830c317 winex11: Simplify XInput2 device valuator lookup.
Valuator names aren't well specified, and although they are usually
named "Rel X/Y" or "Abs X/Y", there are cases where the names are
different.

Lets just assume that the first two valuators are the X/Y axes, as it
seems to be generally the case.
2024-02-12 12:32:23 +01:00
Rémi Bernon
b7867059ce winex11: Initialize XInput2 extension on every thread. 2024-02-12 12:32:22 +01:00
Rémi Bernon
1a757a0146 winex11: Advertise XInput2 version 2.2 support.
This is the required version for XInput2 touch events. It also allows
to greatly simplify the code by listening to master device events only
and get rid of device id tracking:

Under XInput2 protocol version < 2.1, RawEvents are not supposed to be
sent if a pointer grab is active. However slave device events are still
received regardless of this specification and Wine implemented a
workaround to receive RawEvents during pointer grabs by listening to
these slave device events.

By advertising the support of XInput2 version >= 2.1, where RawEvents
are sent even during pointer grabs, we ensure to receive the RawMotion
even if a mouse grab is active.
2024-02-12 12:32:20 +01:00
Alexandre Julliard
5cd3861438 winex11.drv: Return result through NtCallbackReturn for the drag and drop callbacks. 2024-01-19 13:46:34 +01:00
Rémi Bernon
5f313c0fdb win32u: Move ImeToAsciiEx implementation from winex11.
Using a new WINE_IME_POST_UPDATE NtUserMessageCall call for the drivers.
2024-01-17 21:54:55 +01:00
Rémi Bernon
19ad5bd598 server: Peek wine internal driver messages regardless of filter.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55774
2023-12-13 19:13:01 +01:00
Alexandre Julliard
3c94236186 winex11: Use UINT instead of BOOL to avoid warnings for one-bit variables. 2023-12-07 08:37:30 +01:00
Rémi Bernon
48e6bf3cf1 winex11: Use the new SystrayDock driver interface. 2023-12-01 19:09:14 +01:00
Alexandre Julliard
bfeba8d2d1 winex11.drv: Remove DECLSPEC_HIDDEN usage. 2023-11-29 23:16:39 +01:00
Arkadiusz Hiler
2bfe81e41f winex11.drv: Send missed KEYUP events on KeymapNotify.
Full focus lost / focus gained events on the Windows side are not
feasible for X11's FocusIn/FocusOut events generated by keyboard grabs
(see XGrabKeyboard()) that are used for example for Atl+Tab handling.
Using them would degrade user's experience by causing the window to
minimize or flash multiple times depending on a game/window manager
combo.

Because of that the programs may miss on some KEYUP events that happen
during the grab, and since there are no focus changes on the Windows
side the state doesn't get resynced.

This change attempts to improve user experience by syncing any missed
key release events that happened while the window haven't had focus on
the X11 side.

There's no syncing of key presses as those are more problematic because
of window manager quirks, e.g. on KDE it may end up syncing the Tab
press portion of Alt+Tab. Luckily missing key events for keys that were
pressed and not released while the WM had the keyboard grab is not
nearly as confusing as stuck keys.

For Warhammer: Chaosbane, theHunter: Call of the Wild, Far Cry Primal
and many other games that end up with stuck Alt after Alt+Tabbing.
2023-10-18 20:47:00 +02:00
Zhiyi Zhang
70c9239cb2 winex11.drv: Set _NET_WM_FULLSCREEN_MONITORS only when necessary.
If _NET_WM_FULLSCREEN_MONITORS is set then the property needs to be updated because it can't
be deleted by sending a _NET_WM_FULLSCREEN_MONITORS client message to the root window
according to the wm-spec version 1.5. Having the window spanning more than two monitors also
needs the property set. In other cases, _NET_WM_FULLSCREEN_MONITORS doesn't need to be set.
What's more, setting _NET_WM_FULLSCREEN_MONITORS adds a constraint on Mutter so that such a
window can't be moved to another monitor by using the Shift+Super+Up/Down/Left/Right
shortcut. So the property should be added only when necessary.
2023-10-11 20:29:49 +02:00
Gabriel Ivăncescu
88c1ef974a winex11: Avoid querying GPU properties in get_host_primary_monitor_rect.
Since we only need the id, and vkGetRandROutputDisplayEXT can be extremely
expensive.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55500
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-08-30 19:22:09 +02:00
Jacek Caban
61b80f6704 win32u: Remove no longer needed NtUserSendDriverMessage.
All messages are packed now anyway.
2023-08-02 20:03:51 +09:00
Rémi Bernon
9b7669592d win32u: Move virtual desktop display settings logic from winex11. 2023-06-21 18:26:33 +02:00
Rémi Bernon
272f712b60 winex11: Replace the clipping message HWND with a BOOL flag.
We don't need the window anymore, it was only used to send ClipCursor
notifications. This improves cursor clipping performance a lot as it
avoids re-creating a window every time.
2023-06-15 22:14:35 +02:00
Rémi Bernon
1f90d03b78 winex11: Simplify the cursor clipping retry mechanism.
If the focus changes between Wine windows, the wineserver logic will
decide to reset the clipping rectangle. However winex11 also needs to
support the case when focus changes to a host window, in virtual desktop
mode, and in this case the foreground window doesn't actually change.

To fix this, in virtual desktop mode, release the cursor on focus out
events, and reapply the cursor clipping rect when the virtual desktop
window is focused again.

We can use the same logic on NotifyGrab events, when the WM grabs the
keyboard, and later reapply the Wine clipping rect when we are notified
about the keyboard ungrab.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55046
2023-06-15 22:13:45 +02:00
Rémi Bernon
89415925b7 winex11: Don't grab the cursor if another process is focused.
This might be the case when in virtual desktop mode for instance, where
we don't change Wine foreground window when the virtual desktop is
focused out.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55046
2023-06-15 22:13:43 +02:00
Rémi Bernon
9f8d9eef21 winex11: Set the window cursor immediately in SetCursor.
Instead of synchronizing the cursor on mouse changes. The SetCursor call
should now only be made when cursor or window handle have changed.
2023-06-13 22:10:56 +02:00
Rémi Bernon
3afff1a690 win32u: Add a hwnd parameter to SetCursor driver entry points. 2023-06-13 22:10:56 +02:00
Rémi Bernon
af902c188e win32u: Move fullscreen window cursor clipping from winex11. 2023-06-12 21:21:42 +02:00
Rémi Bernon
f47ed29260 win32u: Move grab_pointer registry option from winex11. 2023-06-12 21:21:42 +02:00
Rémi Bernon
bb043fb63e winex11: Remove now unnecessary WM_X11DRV_CLIP_CURSOR_NOTIFY. 2023-06-12 21:21:42 +02:00
Rémi Bernon
b7570b798e win32u: Add a reset parameter to WM_WINE_CLIPCURSOR and driver ClipCursor. 2023-06-07 22:48:27 +02:00
Rémi Bernon
b863d3ab14 winex11: Reset clipping by calling NtUserClipCursor directly. 2023-06-02 21:08:34 +02:00
Rémi Bernon
5bdbbee6f4 winex11: Rely on win32u to reset clipping on display mode change. 2023-06-02 21:08:34 +02:00
Jacek Caban
8c5dd2214e win32u: Don't use CDECL for gdi_dc_funcs entries. 2023-05-31 12:48:52 +02:00
Rémi Bernon
4fcbbf8c9a winex11: Use the user driver interface to create host desktops. 2023-05-30 13:45:45 +02:00
Rémi Bernon
15dfe2ed2d win32u: Rename user driver CreateDesktopWindow entry to SetDesktopWindow.
This doesn't create anything, but instead notifies the user driver of
the current desktop window, either when it is created, or when a thread
calling NtUserGetDesktopWindow receives the current desktop window.
2023-05-30 13:45:33 +02:00
Rémi Bernon
9b4c09d8c4 winex11: Post internal WM_IME_NOTIFY wparam on composition updates. 2023-05-18 09:09:14 -05:00
Rémi Bernon
ecd8c9310f winex11: Set or clear XIC focus using a xim_set_focus helper. 2023-05-18 09:09:14 -05:00
Rémi Bernon
e70b1b722a winex11: Use ime_comp_buf != NULL instead of ximInComposeMode. 2023-05-18 09:09:14 -05:00
Rémi Bernon
56d0b870b6 win32u: Introduce new NtUserNotifyIMEStatus syscall. 2023-05-10 21:21:25 +02:00
Alexandros Frantzis
2c02d6e817 winex11.drv: Use a distinct type for the settings id.
This helps us avoid using an id from a different namespace (e.g.,
from the host handler id namespace) as a settings id.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
2023-04-06 14:33:06 +02:00
Rémi Bernon
2be535a221 winex11: Set x11drv_win_data XIC out of X11DRV_CreateIC. 2023-04-05 14:56:11 +02:00
Alexandros Frantzis
4232312dff winex11.drv: Set the current mode using gdi_device_manager.
Since setting the current mode also sets the registry settings (if not
previously set), we also remove the code that manually changes the
registry settings.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
2023-04-04 21:57:38 +02:00
Rémi Bernon
4390b01176 winex11: Create the thread XFontSet on thread attach. 2023-04-03 16:56:18 +02:00
Rémi Bernon
b91774a1ee winex11: Pass hwnd parameter to all XIC callbacks. 2023-04-03 16:56:18 +02:00
Rémi Bernon
ad5cb8305f winex11: Assume that Xkb extension is available. 2023-02-28 20:55:45 +01:00
Paul Gofman
a97fd9f29e win32u: Expose and use ProcessEvents from drivers instead of MsgWaitForMultipleObjectsEx. 2023-02-22 18:25:29 +01:00
Zebediah Figura
2b06773417 winex11: Make client_foreign_window_proc hidden. 2023-01-30 16:49:55 +01:00
Zhiyi Zhang
d81cf4ed55 win32u: Introduce a get_display_depth() helper to retrieve emulated display depth.
Using EnumDisplaySettings() directly to query display depth has a high overhead when using the
XRandR 1.0 display device handler on some NVIDIA setups.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51420
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53382
2023-01-09 16:44:08 +01:00
Zhiyi Zhang
5c64b505c2 winex11.drv: Support _KDE_NET_WM_STATE_SKIP_SWITCHER.
KWin has a switcher that triggered by Alt+Tab that basically acts like a pager. And hiding items in
the switcher is controlled by _KDE_NET_WM_STATE_SKIP_SWITCHER.
2022-11-28 21:01:55 +01:00
Alexandre Julliard
7d614be43c winex11: Use int instead of long types in a few places. 2022-11-18 09:23:38 +01:00
Alexandre Julliard
1a5bfe1307 winex11: Add a debug helper to print color values. 2022-11-18 09:21:03 +01:00
Zhiyi Zhang
bd8ec8f264 winex11.drv: Support _NET_WM_FULLSCREEN_MONITORS.
Support _NET_WM_FULLSCREEN_MONITORS for fullscreen windows spanning multiple monitors. This property
is used to hint window managers about which monitor a fullscreen window should cover. Window managers
make a fullscreen window spanning multiple monitors cover only one monitor when this property is missing.

Fix Project Cars 2/3 incorrect game window size when the triple-screen mode is on.
2022-11-04 19:23:55 +01:00