From 33ae5a92d5fa22956abb62bfae5a4e701dc8d497 Mon Sep 17 00:00:00 2001 From: Scott Leggett Date: Mon, 22 Jun 2026 14:41:44 +0800 Subject: [PATCH] layer_shell: fix focus stealing for ON_DEMAND surfaces arrange_layers was stripping focus from any surface that wasn't strictly EXCLUSIVE. This caused ON_DEMAND surfaces like `fuzzel --keyboard-focus=on-demand` to immediately lose focus upon receiving it. Update the check to only strip focus if the surface explicitly requests NONE keyboard interactivity. --- sway/desktop/layer_shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c index 268c355c2..2d9b0aae0 100644 --- a/sway/desktop/layer_shell.c +++ b/sway/desktop/layer_shell.c @@ -132,7 +132,7 @@ void arrange_layers(struct sway_output *output) { seat_set_focus_layer(seat, topmost->layer_surface); } else if (seat->focused_layer && seat->focused_layer->current.keyboard_interactive - != ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE) { + == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE) { seat_set_focus_layer(seat, NULL); } }