]> git.mdlowis.com Git - proto/labwc.git/commit
cursor: fix button release events sometimes not being sent
authortokyo4j <hrak1529@gmail.com>
Mon, 7 Oct 2024 00:20:58 +0000 (09:20 +0900)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 13 Oct 2024 19:45:16 +0000 (20:45 +0100)
commit7cc79edd62aecad1c4ad6a865f11d435272490c4
treee6e4f8f107290aeb4090162a7ebaf1ce16247c36
parente0848da70daa9ac5561146a45241c21c993ed4bb
cursor: fix button release events sometimes not being sent

When `wlr_seat_pointer_notify_button()` is called on a button press event,
that funtion must also be called on the subsequent button release event
because otherwise wlroots thinks the button is kept pressed and it
causes issues with validating DnD requests from clients, where only one
button must be pressed. This was the case when a CSD client opens a
client-menu via `show_window_menu` request after pressing its window with
the right button because we were always not notifying button release
events while a menu is open.

So let's keep track of bound (pressed but not notified) buttons and notify
button release events only when the button is not bound, like we are doing
for key-state.
include/labwc.h
src/input/cursor.c