Skip to content
Snippets Groups Projects
Commit 503e7663 authored by Olivier Fourdan's avatar Olivier Fourdan :tools:
Browse files

xwayland: do not auto-lock pointer when rootful


Xwayland tries to be smart and guess the intention of the X11 clients
sometimes, like issuing a pointer lock when a client hides the pointer
when confined.

While this is a good thing when running rootless, this is problematic
when running rootful as the pointer will be automatically locked unless
the "retro" mode is used (which doesn't hide the cursor, unlike the
default).

Make sure we don't trigger the automatic pointer lock when the cursor is
hidden when running rootful.

Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
parent d370f1e5
No related branches found
No related tags found
No related merge requests found
...@@ -3202,6 +3202,8 @@ xwl_seat_emulate_pointer_warp(struct xwl_seat *xwl_seat, ...@@ -3202,6 +3202,8 @@ xwl_seat_emulate_pointer_warp(struct xwl_seat *xwl_seat,
static Bool static Bool
xwl_seat_maybe_lock_on_hidden_cursor(struct xwl_seat *xwl_seat) xwl_seat_maybe_lock_on_hidden_cursor(struct xwl_seat *xwl_seat)
{ {
struct xwl_screen *xwl_screen = xwl_seat->xwl_screen;
/* Some clients use hidden cursor+confineTo+relative motion /* Some clients use hidden cursor+confineTo+relative motion
* to implement infinite panning (eg. 3D views), lock the * to implement infinite panning (eg. 3D views), lock the
* pointer for so the relative pointer is used. * pointer for so the relative pointer is used.
...@@ -3212,6 +3214,9 @@ xwl_seat_maybe_lock_on_hidden_cursor(struct xwl_seat *xwl_seat) ...@@ -3212,6 +3214,9 @@ xwl_seat_maybe_lock_on_hidden_cursor(struct xwl_seat *xwl_seat)
if (!xwl_seat->focus_window) if (!xwl_seat->focus_window)
return FALSE; return FALSE;
if (!xwl_screen->rootless)
return FALSE;
if (xwl_seat->cursor_confinement_window != xwl_seat->focus_window) if (xwl_seat->cursor_confinement_window != xwl_seat->focus_window)
return FALSE; return FALSE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment