From 0dbf2673a1f4c8ece52b4e161e344bf90d658b7c Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Sat, 29 Dec 2018 00:30:27 -0500 Subject: Remove button from state on release during op This fixes a bug in `dispatch_cursor_button` where if there was an operation occurring, the button would not be removed from the state on release. This resulted in the button appearing to be permanently pressed and caused mouse bindings to not match correctly. --- sway/input/cursor.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sway/input/cursor.c') diff --git a/sway/input/cursor.c b/sway/input/cursor.c index efc00754..22c5b075 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -825,6 +825,11 @@ void dispatch_cursor_button(struct sway_cursor *cursor, seat_end_mouse_operation(seat); seat_pointer_notify_button(seat, time_msec, button, state); } + if (state == WLR_BUTTON_PRESSED) { + state_add_button(cursor, button); + } else { + state_erase_button(cursor, button); + } return; } -- cgit v1.2.3