aboutsummaryrefslogtreecommitdiff
path: root/sway/input
diff options
context:
space:
mode:
authorRouven Czerwinski <rouven@czerwinskis.de>2020-09-14 19:49:01 +0200
committerTudor Brindus <me@tbrindus.ca>2020-09-14 18:14:08 -0400
commitafa890e8e9f10667a56e896a114bf81fbc3ff54a (patch)
tree2ee5bfc93496c910e867898b09f81957cabbeb80 /sway/input
parent7ca9ef12f8b6a00b8020a500433fabc6b645d85c (diff)
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) {
cursor_set_image(cursor, image, cursor->image_client);
}
cursor_rebase(cursor);
+ wl_event_source_timer_update(cursor->hide_source, cursor_get_timeout(cursor));
}
static 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) {
}
if (seat->cursor->hidden){
cursor_unhide(seat->cursor);
- wl_event_source_timer_update(seat->cursor->hide_source, cursor_get_timeout(seat->cursor));
}
}