aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input
diff options
context:
space:
mode:
authorLibravatar Rouven Czerwinski <rouven@czerwinskis.de>2020-09-14 19:49:01 +0200
committerLibravatar Tudor Brindus <me@tbrindus.ca>2020-09-14 18:14:08 -0400
commitafa890e8e9f10667a56e896a114bf81fbc3ff54a (patch)
tree2ee5bfc93496c910e867898b09f81957cabbeb80 /sway/input
parentRe-focus on parent surface if it is available (diff)
downloadsway-afa890e8e9f10667a56e896a114bf81fbc3ff54a.tar.gz
sway-afa890e8e9f10667a56e896a114bf81fbc3ff54a.tar.zst
sway-afa890e8e9f10667a56e896a114bf81fbc3ff54a.zip
input/cursor: reset event source after unhide
Reset the event source after unhiding the cursor, to ensure that the timeout starts after showing the cursor. Also remove the open coded variant in seat_consider_warp_to_focus(). Fixes #5679
Diffstat (limited to 'sway/input')
-rw-r--r--sway/input/cursor.c1
-rw-r--r--sway/input/seat.c1
2 files changed, 1 insertions, 1 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index e43a0e71..dbb8c48d 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -299,6 +299,7 @@ void cursor_unhide(struct sway_cursor *cursor) {
299 cursor_set_image(cursor, image, cursor->image_client); 299 cursor_set_image(cursor, image, cursor->image_client);
300 } 300 }
301 cursor_rebase(cursor); 301 cursor_rebase(cursor);
302 wl_event_source_timer_update(cursor->hide_source, cursor_get_timeout(cursor));
302} 303}
303 304
304static void pointer_motion(struct sway_cursor *cursor, uint32_t time_msec, 305static void pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
diff --git a/sway/input/seat.c b/sway/input/seat.c
index e16d747c..8c80e41c 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -1482,7 +1482,6 @@ void seat_consider_warp_to_focus(struct sway_seat *seat) {
1482 } 1482 }
1483 if (seat->cursor->hidden){ 1483 if (seat->cursor->hidden){
1484 cursor_unhide(seat->cursor); 1484 cursor_unhide(seat->cursor);
1485 wl_event_source_timer_update(seat->cursor->hide_source, cursor_get_timeout(seat->cursor));
1486 } 1485 }
1487} 1486}
1488 1487