From 32d24ef620c0d50306d11da091860ee672390e33 Mon Sep 17 00:00:00 2001 From: Scott Leggett Date: Sun, 17 May 2026 22:32:02 +0800 Subject: [PATCH] input/seatop_default: do not focus workspace if clicking a layer surface Previously, the pointer handler in `seatop_default` would focus the workspace, regardless of whether a surface intercepted the click. This commit adds a check for `surface == NULL`, allowing the click event to fall through to the layer surface handler. --- sway/input/seatop_default.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c index df8232afc..1e321f331 100644 --- a/sway/input/seatop_default.c +++ b/sway/input/seatop_default.c @@ -370,7 +370,7 @@ 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 && surface == NULL) { if (state == WL_POINTER_BUTTON_STATE_PRESSED) { seat_set_focus(seat, node); transaction_commit_dirty();