aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seatop_default.c
diff options
context:
space:
mode:
authorLibravatar Simon Plakolb <s.plakolb@gmail.com>2021-08-02 16:54:50 +0200
committerLibravatar Tudor Brindus <vulcainus@gmail.com>2021-09-02 13:13:40 -0400
commit9e58425cb3b61c4073f0789f23d0943bc87e424f (patch)
tree5c6739124385afd5368be1e4a8bad4b1943e053e /sway/input/seatop_default.c
parentAdd `output modeline` command (diff)
downloadsway-9e58425cb3b61c4073f0789f23d0943bc87e424f.tar.gz
sway-9e58425cb3b61c4073f0789f23d0943bc87e424f.tar.zst
sway-9e58425cb3b61c4073f0789f23d0943bc87e424f.zip
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.
Diffstat (limited to 'sway/input/seatop_default.c')
-rw-r--r--sway/input/seatop_default.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c
index f9eb8c8a..7a3745d2 100644
--- a/sway/input/seatop_default.c
+++ b/sway/input/seatop_default.c
@@ -373,6 +373,9 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
373 seat_set_focus_layer(seat, layer); 373 seat_set_focus_layer(seat, layer);
374 transaction_commit_dirty(); 374 transaction_commit_dirty();
375 } 375 }
376 if (state == WLR_BUTTON_PRESSED) {
377 seatop_begin_down_on_layer_surface(seat, surface, time_msec, sx, sy);
378 }
376 seat_pointer_notify_button(seat, time_msec, button, state); 379 seat_pointer_notify_button(seat, time_msec, button, state);
377 return; 380 return;
378 } 381 }