Skip to content

Commit

Permalink
input/seatop_default: release on empty workspace
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Emantor authored and emersion committed Apr 15, 2020
1 parent c0bce91 commit 0efc28e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sway/input/seatop_default.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0efc28e

Please sign in to comment.