Skip to content
Commit c6df0d03 authored by Carlos Garnacho's avatar Carlos Garnacho Committed by Adam Jackson
Browse files

xwayland: Lock the pointer if it is confined and has no cursor



In the typical pattern in games of "hide cursor, grab with a confineTo,
warp constantly the pointer to the middle of the window" the last warping
step is actually rather optional. Some games may choose to just set up a
grab with confineTo argument, and trust that they'll get correct relative
X/Y axis values despite the hidden cursor hitting the confinement window
edge.

To cater for these cases, lock the pointer whenever there is a pointer
confinement and the cursor is hidden. This ensures the pointer position
is in sync with the compositor's when it's next shown again, and more
importantly resorts to the relative pointer for event delivery.

Signed-off-by: default avatarCarlos Garnacho <carlosg@gnome.org>
Reviewed-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit ca17f3e9)
parent 2ccea152
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment