xwayland: Allow pointer warps even when cursor is visible.

This fixes XWarpPointer being no-op on XWayland even when the cursor is
within the focused window surface. This is something that works with X
server, and Wine expects that to implement Windows SetCursorPos for many
games.

Using zwp_locked_pointer_v1 should already make sure we're not warping
pointer when outside of the focused window surface.
This commit is contained in:
Rémi Bernon 2025-02-26 11:28:38 +01:00 committed by Alan Coopersmith
parent 5fa59f2333
commit 916ec5068d

View file

@ -3521,9 +3521,6 @@ xwl_seat_emulate_pointer_warp(struct xwl_seat *xwl_seat,
if (!xwl_seat_can_emulate_pointer_warp(xwl_seat))
return;
if (xwl_seat->x_cursor != NULL)
return;
if (!xwl_seat->pointer_warp_emulator)
xwl_seat_create_pointer_warp_emulator(xwl_seat);
@ -3534,6 +3531,9 @@ xwl_seat_emulate_pointer_warp(struct xwl_seat *xwl_seat,
xwl_window,
sprite,
x, y);
if (xwl_seat->x_cursor != NULL)
xwl_seat_destroy_pointer_warp_emulator(xwl_seat);
}
static Bool