sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 0efc28e2f58a9a98d219cf2f3a92e18577c9926c
parent c0bce9138b9009724b8b5650ec2ec00b06b948b2
Author: Rouven Czerwinski <rouven@czerwinskis.de>
Date:   Fri, 10 Apr 2020 09:40:45 +0200

input/seatop_default: release on empty workspace

Instead of handling presses and releases on empty workspaces as setting
focus to the workspace, handle releases by notifying the seat of a
pointer action. This way DnDs are correctly released if the button is
released over an empty workspace. This is achieved by removing the early
return and letting the handle_button() call seat_pointer_notify_button()
at the very end.

Fixes #3932

Diffstat:
Msway/input/seatop_default.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c @@ -280,7 +280,10 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec, // Handle clicking an empty workspace if (node && node->type == N_WORKSPACE) { - seat_set_focus(seat, node); + if (state == WLR_BUTTON_PRESSED) { + seat_set_focus(seat, node); + } + seat_pointer_notify_button(seat, time_msec, button, state); return; }