mirror of
https://github.com/swaywm/sway.git
synced 2026-04-22 06:46:27 -04:00
input: Use seatop_down on layer surface click
This solves an issue where layer-shell items would not receive a button release event when the pointer left them while being pressed. The default seatop changes focus immediately while seatop_down defers any focus changes until the pointer is released or seatop_down is destroyed.
This commit is contained in:
parent
57d6f6f19e
commit
9e58425cb3
3 changed files with 31 additions and 5 deletions
|
|
@ -373,6 +373,9 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
|
|||
seat_set_focus_layer(seat, layer);
|
||||
transaction_commit_dirty();
|
||||
}
|
||||
if (state == WLR_BUTTON_PRESSED) {
|
||||
seatop_begin_down_on_layer_surface(seat, surface, time_msec, sx, sy);
|
||||
}
|
||||
seat_pointer_notify_button(seat, time_msec, button, state);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue