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

xwayland: Lock on entering surface if needed


When an X11 client issues a ConfinePointer wit ha hidden cursor,
Xwayland may translate that as a pointer lock.

However, if the pointer is located on another window at the time,
the request may be ignored, even if the pointer later enters the window.

To avoid that issue, check again if locking the pointer with a hidden
cursor is needed when pointer enters a surface.

Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
Reviewed-by: default avatarCarlos Garnacho <carlosg@gnome.org>
Reviewed-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 1345f804
No related branches found
No related tags found
1 merge request!414xwayland: Pointer contraints and locking fixes
...@@ -72,6 +72,9 @@ xwl_pointer_warp_emulator_maybe_lock(struct xwl_pointer_warp_emulator *warp_emul ...@@ -72,6 +72,9 @@ xwl_pointer_warp_emulator_maybe_lock(struct xwl_pointer_warp_emulator *warp_emul
SpritePtr sprite, SpritePtr sprite,
int x, int y); int x, int y);
static Bool
xwl_seat_maybe_lock_on_hidden_cursor(struct xwl_seat *xwl_seat);
static void static void
xwl_seat_destroy_confined_pointer(struct xwl_seat *xwl_seat); xwl_seat_destroy_confined_pointer(struct xwl_seat *xwl_seat);
...@@ -447,6 +450,9 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer, ...@@ -447,6 +450,9 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer,
xwl_seat->focus_window, xwl_seat->focus_window,
NULL, 0, 0); NULL, 0, 0);
} }
else {
xwl_seat_maybe_lock_on_hidden_cursor(xwl_seat);
}
} }
static void static void
......
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