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.
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.
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.
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.
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>
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.
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
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
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.
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>
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>
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.
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.