From f5a25abc1fafd273e230dfc807003f5bce0e0109 Mon Sep 17 00:00:00 2001 From: Scott Moreau Date: Sun, 4 Feb 2024 05:26:45 -0700 Subject: [PATCH] layer-shell: Refocus the keyboard focus view after arranging layers This effectively makes it so the view that had focus before interacting with wf-shell apps, is focused after interactivity is complete. Fixes #2118. Fixes #2047. --- src/view/layer-shell/layer-shell.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/view/layer-shell/layer-shell.cpp b/src/view/layer-shell/layer-shell.cpp index ca7607957..1a24f29b5 100644 --- a/src/view/layer-shell/layer-shell.cpp +++ b/src/view/layer-shell/layer-shell.cpp @@ -566,6 +566,9 @@ void wayfire_layer_shell_view::commit() if ((state->keyboard_interactive >= 1) && (state->layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP)) { wf::get_core().seat->focus_view(self()); + } else + { + wf::get_core().seat->refocus(); } }