From adb60d8c7faf903ce77e27a064e6b0a3dc40b505 Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Tue, 25 Oct 2022 18:18:05 +0200 Subject: [PATCH] shell/tiling: Fix endless focus loop --- src/shell/layout/tiling/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shell/layout/tiling/mod.rs b/src/shell/layout/tiling/mod.rs index 87ee2fd1..77bab330 100644 --- a/src/shell/layout/tiling/mod.rs +++ b/src/shell/layout/tiling/mod.rs @@ -435,7 +435,7 @@ impl TilingLayout { // TODO: Rather use something like seat.current_keyboard_focus // TODO https://github.com/Smithay/smithay/pull/777 if let Some(last_active) = TilingLayout::last_active_window(tree, focus_stack) { - let (last_window, node_id) = last_active; + let (last_window, mut node_id) = last_active; // stacks may handle focus internally if last_window.handle_focus(direction) { @@ -562,6 +562,8 @@ impl TilingLayout { } } } + } else { + node_id = group.clone(); } } }