aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2020-06-07 16:43:53 -0400
committerFurkan Sahin <furkan-dev@proton.me>2020-06-07 16:43:53 -0400
commitb98aa076e2b291eb4d814e31199d79ad4b3eec3b (patch)
tree1312d488a0fc81d824e59cdc11c04b30ce935e2f
parentb84167a2c3b5705afea680b4fcc757c952e65587 (diff)
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.
-rw-r--r--sway/input/cursor.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 0d5b076b..e43a0e71 100644
--- 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);
}
}