From 9e58425cb3b61c4073f0789f23d0943bc87e424f Mon Sep 17 00:00:00 2001 From: Simon Plakolb Date: Mon, 2 Aug 2021 16:54:50 +0200 Subject: 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. --- sway/input/seatop_default.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sway/input/seatop_default.c') 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, 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; } -- cgit v1.2.3-54-g00ecf