mirror of
https://github.com/swaywm/sway.git
synced 2024-12-30 17:06:40 +01:00
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.
This commit is contained in:
parent
c54258f323
commit
0dbf2673a1
1 changed files with 5 additions and 0 deletions
|
@ -825,6 +825,11 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
|
||||||
seat_end_mouse_operation(seat);
|
seat_end_mouse_operation(seat);
|
||||||
seat_pointer_notify_button(seat, time_msec, button, state);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue