aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Maese <memaese@hotmail.com>2019-06-07 22:36:47 -0500
committerBrian Ashworth <bosrsf04@gmail.com>2019-06-08 12:02:28 -0400
commit4d93b96b6ec724e31363ebff725486167b99f660 (patch)
treed6d0fde966cac539e59e6fc307349f9bbc76feb4
parentf17eae9043ec2d74b7b7ee6815ef024a7ba3ce77 (diff)
Unhide cursor on cursor activity after touch
-rw-r--r--sway/input/cursor.c10
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) {
}
}
-static int hide_notify(void *data) {
- struct sway_cursor *cursor = data;
+static void cursor_hide(struct sway_cursor *cursor) {
wlr_cursor_set_image(cursor->cursor, NULL, 0, 0, 0, 0, 0, 0);
cursor->hidden = true;
wlr_seat_pointer_clear_focus(cursor->seat->wlr_seat);
+}
+
+static int hide_notify(void *data) {
+ struct sway_cursor *cursor = data;
+ cursor_hide(cursor);
return 1;
}
@@ -358,7 +362,7 @@ static void handle_touch_down(struct wl_listener *listener, void *data) {
if (seat_is_input_allowed(seat, surface)) {
wlr_seat_touch_notify_down(wlr_seat, surface, event->time_msec,
event->touch_id, sx, sy);
- cursor_set_image(cursor, NULL, NULL);
+ cursor_hide(cursor);
}
}