aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-12-29 00:30:27 -0500
committerLibravatar emersion <contact@emersion.fr>2018-12-29 16:36:48 +0100
commit0dbf2673a1f4c8ece52b4e161e344bf90d658b7c (patch)
tree032748a51b04f6c51ea21c25b6abe8690984395f /sway/input/cursor.c
parentMerge pull request #3346 from ermo/sway-bar_focused_statusline_colour-render-fix (diff)
downloadsway-0dbf2673a1f4c8ece52b4e161e344bf90d658b7c.tar.gz
sway-0dbf2673a1f4c8ece52b4e161e344bf90d658b7c.tar.zst
sway-0dbf2673a1f4c8ece52b4e161e344bf90d658b7c.zip
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.
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c5
1 files changed, 5 insertions, 0 deletions
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,
825 seat_end_mouse_operation(seat); 825 seat_end_mouse_operation(seat);
826 seat_pointer_notify_button(seat, time_msec, button, state); 826 seat_pointer_notify_button(seat, time_msec, button, state);
827 } 827 }
828 if (state == WLR_BUTTON_PRESSED) {
829 state_add_button(cursor, button);
830 } else {
831 state_erase_button(cursor, button);
832 }
828 return; 833 return;
829 } 834 }
830 835