aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorLibravatar Rouven Czerwinski <rouven@czerwinskis.de>2020-09-15 17:48:21 +0200
committerLibravatar Simon Ser <contact@emersion.fr>2020-09-16 07:53:57 +0200
commit41999d7c9f9878017d9199f4cdeaf621d5fd706e (patch)
tree3b5e1512cd4685e014ad4c4ee687d5637d92d991 /sway/input/cursor.c
parentserver: Avoid using "wayland-0" as WAYLAND_DISPLAY (diff)
downloadsway-41999d7c9f9878017d9199f4cdeaf621d5fd706e.tar.gz
sway-41999d7c9f9878017d9199f4cdeaf621d5fd706e.tar.zst
sway-41999d7c9f9878017d9199f4cdeaf621d5fd706e.zip
cursor: update hide timer during config apply
We can't arm the timer during cursor creation since the config may not be ready yet. Instead arm the timer while applying the input configuration, by this time the configuration has been parsed and we can arm the hide timer. Fixes #5686
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 3e6b147e..f5c2bd17 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -1041,8 +1041,6 @@ struct sway_cursor *sway_cursor_create(struct sway_seat *seat) {
1041 1041
1042 cursor->hide_source = wl_event_loop_add_timer(server.wl_event_loop, 1042 cursor->hide_source = wl_event_loop_add_timer(server.wl_event_loop,
1043 hide_notify, cursor); 1043 hide_notify, cursor);
1044 wl_event_source_timer_update(
1045 cursor->hide_source, cursor_get_timeout(cursor));
1046 1044
1047 wl_list_init(&cursor->image_surface_destroy.link); 1045 wl_list_init(&cursor->image_surface_destroy.link);
1048 cursor->image_surface_destroy.notify = handle_image_surface_destroy; 1046 cursor->image_surface_destroy.notify = handle_image_surface_destroy;