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 swaywm#3932
  • Loading branch information
Emantor committed Apr 14, 2020
1 parent 34dccd4 commit 9049776
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sway/input/seatop_default.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,8 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
}

// Handle clicking an empty workspace
if (node && node->type == N_WORKSPACE) {
if (node && node->type == N_WORKSPACE && state == WLR_BUTTON_PRESSED) {
seat_set_focus(seat, node);
return;
}

// Handle clicking a layer surface
Expand Down

0 comments on commit 9049776

Please sign in to comment.