aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input
diff options
context:
space:
mode:
authorLibravatar Tudor Brindus <me@tbrindus.ca>2020-09-14 18:40:26 -0400
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2020-09-14 22:28:21 -0400
commit2efecc14ef8ea7c82ae85f632a0def1a1719a91d (patch)
tree45fcb263a3d407a5b938c0aa7cffd513a4dfb598 /sway/input
parentswaynag: add details background option (diff)
downloadsway-2efecc14ef8ea7c82ae85f632a0def1a1719a91d.tar.gz
sway-2efecc14ef8ea7c82ae85f632a0def1a1719a91d.tar.zst
sway-2efecc14ef8ea7c82ae85f632a0def1a1719a91d.zip
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/input')
-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,
378static void handle_pointer_button(struct wl_listener *listener, void *data) { 378static void handle_pointer_button(struct wl_listener *listener, void *data) {
379 struct sway_cursor *cursor = wl_container_of(listener, cursor, button); 379 struct sway_cursor *cursor = wl_container_of(listener, cursor, button);
380 struct wlr_event_pointer_button *event = data; 380 struct wlr_event_pointer_button *event = data;
381 cursor_handle_activity(cursor, event->device);
382 381
383 if (event->state == WLR_BUTTON_PRESSED) { 382 if (event->state == WLR_BUTTON_PRESSED) {
384 cursor->pressed_button_count++; 383 cursor->pressed_button_count++;
@@ -390,6 +389,7 @@ static void handle_pointer_button(struct wl_listener *listener, void *data) {
390 } 389 }
391 } 390 }
392 391
392 cursor_handle_activity(cursor, event->device);
393 dispatch_cursor_button(cursor, event->device, 393 dispatch_cursor_button(cursor, event->device,
394 event->time_msec, event->button, event->state); 394 event->time_msec, event->button, event->state);
395 transaction_commit_dirty(); 395 transaction_commit_dirty();