sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 6b9a9b62462c0fae7b09294700112c569a3ccc19
parent 2f3afef95c3eb692a081660e40583e7521c1d7c6
Author: Tudor Brindus <me@tbrindus.ca>
Date:   Sun,  7 Jun 2020 16:43:53 -0400

input/cursor: don't send wl_pointer.motion event on pointer unlock warp

On warping to a cursor hint, update the pointer position we track as
well, so that on the next pointer rebase we don't send an unexpected
synthetic motion event to clients.

Fixes #5405.

Diffstat:
Msway/input/cursor.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/sway/input/cursor.c b/sway/input/cursor.c @@ -1244,6 +1244,10 @@ static void warp_to_constraint_cursor_hint(struct sway_cursor *cursor) { double ly = sy + con->content_y - view->geometry.y; wlr_cursor_warp(cursor->cursor, NULL, lx, ly); + + // Warp the pointer as well, so that on the next pointer rebase we don't + // send an unexpected synthetic motion event to clients. + wlr_seat_pointer_warp(constraint->seat, sx, sy); } }