aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorTudor Brindus <me@tbrindus.ca>2020-09-14 18:40:26 -0400
committerBrian Ashworth <bosrsf04@gmail.com>2020-09-14 22:28:21 -0400
commit2efecc14ef8ea7c82ae85f632a0def1a1719a91d (patch)
tree45fcb263a3d407a5b938c0aa7cffd513a4dfb598 /sway
parenteb1c09030ece6fcf0c6b387c8b74ded106eccecb (diff)
input/pointer: update cursor activity after updating button counts
Otherwise, Sway will not re-hide a cursor after the last button has been released. Needed alongside afa890e to fix #5679.
Diffstat (limited to 'sway')
-rw-r--r--sway/input/cursor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index dbb8c48d..f5c2bd17 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -378,7 +378,6 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
static void handle_pointer_button(struct wl_listener *listener, void *data) {
struct sway_cursor *cursor = wl_container_of(listener, cursor, button);
struct wlr_event_pointer_button *event = data;
- cursor_handle_activity(cursor, event->device);
if (event->state == WLR_BUTTON_PRESSED) {
cursor->pressed_button_count++;
@@ -390,6 +389,7 @@ static void handle_pointer_button(struct wl_listener *listener, void *data) {
}
}
+ cursor_handle_activity(cursor, event->device);
dispatch_cursor_button(cursor, event->device,
event->time_msec, event->button, event->state);
transaction_commit_dirty();