diff options
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r-- | sway/input/cursor.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 61084447..26e60cde 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -174,11 +174,15 @@ void cursor_rebase_all(void) { | |||
174 | } | 174 | } |
175 | } | 175 | } |
176 | 176 | ||
177 | static int hide_notify(void *data) { | 177 | static void cursor_hide(struct sway_cursor *cursor) { |
178 | struct sway_cursor *cursor = data; | ||
179 | wlr_cursor_set_image(cursor->cursor, NULL, 0, 0, 0, 0, 0, 0); | 178 | wlr_cursor_set_image(cursor->cursor, NULL, 0, 0, 0, 0, 0, 0); |
180 | cursor->hidden = true; | 179 | cursor->hidden = true; |
181 | wlr_seat_pointer_clear_focus(cursor->seat->wlr_seat); | 180 | wlr_seat_pointer_clear_focus(cursor->seat->wlr_seat); |
181 | } | ||
182 | |||
183 | static int hide_notify(void *data) { | ||
184 | struct sway_cursor *cursor = data; | ||
185 | cursor_hide(cursor); | ||
182 | return 1; | 186 | return 1; |
183 | } | 187 | } |
184 | 188 | ||
@@ -358,7 +362,7 @@ static void handle_touch_down(struct wl_listener *listener, void *data) { | |||
358 | if (seat_is_input_allowed(seat, surface)) { | 362 | if (seat_is_input_allowed(seat, surface)) { |
359 | wlr_seat_touch_notify_down(wlr_seat, surface, event->time_msec, | 363 | wlr_seat_touch_notify_down(wlr_seat, surface, event->time_msec, |
360 | event->touch_id, sx, sy); | 364 | event->touch_id, sx, sy); |
361 | cursor_set_image(cursor, NULL, NULL); | 365 | cursor_hide(cursor); |
362 | } | 366 | } |
363 | } | 367 | } |
364 | 368 | ||