aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorLibravatar Tudor Brindus <me@tbrindus.ca>2020-06-07 16:43:53 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2020-07-15 19:41:26 +0200
commite79e89c94d20792c122ec5e173808307c7b579f2 (patch)
treef52de45bd984cdcccbae2ce2b2f7ccc14971c630 /sway/input/cursor.c
parentAdd check for empty GEOM variable (diff)
downloadsway-e79e89c94d20792c122ec5e173808307c7b579f2.tar.gz
sway-e79e89c94d20792c122ec5e173808307c7b579f2.tar.zst
sway-e79e89c94d20792c122ec5e173808307c7b579f2.zip
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. (cherry picked from commit 6b9a9b62462c0fae7b09294700112c569a3ccc19)
Diffstat (limited to 'sway/input/cursor.c')
-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) {
1244 double ly = sy + con->content_y - view->geometry.y; 1244 double ly = sy + con->content_y - view->geometry.y;
1245 1245
1246 wlr_cursor_warp(cursor->cursor, NULL, lx, ly); 1246 wlr_cursor_warp(cursor->cursor, NULL, lx, ly);
1247
1248 // Warp the pointer as well, so that on the next pointer rebase we don't
1249 // send an unexpected synthetic motion event to clients.
1250 wlr_seat_pointer_warp(constraint->seat, sx, sy);
1247 } 1251 }
1248} 1252}
1249 1253