Commit baa8d12e authored by Olivier Fourdan's avatar Olivier Fourdan
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 <>
Reviewed-by: Carlos Garnacho's avatarCarlos Garnacho <>
Reviewed-by: Peter Hutterer's avatarPeter Hutterer <>
parent 1345f804
......@@ -72,6 +72,9 @@ xwl_pointer_warp_emulator_maybe_lock(struct xwl_pointer_warp_emulator *warp_emul
SpritePtr sprite,
int x, int y);
static Bool
xwl_seat_maybe_lock_on_hidden_cursor(struct xwl_seat *xwl_seat);
static void
xwl_seat_destroy_confined_pointer(struct xwl_seat *xwl_seat);
......@@ -447,6 +450,9 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer,
NULL, 0, 0);
else {
static void
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment