From f5a4ad5fae4f5f56ff11acbe3904fffcb34ac623 Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Sat, 28 Sep 2024 12:28:17 +0200 Subject: [PATCH] focus: Un-activate non-active workspaces --- src/shell/focus/mod.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/shell/focus/mod.rs b/src/shell/focus/mod.rs index 900aded6..df49acd4 100644 --- a/src/shell/focus/mod.rs +++ b/src/shell/focus/mod.rs @@ -201,7 +201,7 @@ impl Shell { m.window.configure(); } - let workspace = self.workspaces.active_mut(&output); + let workspace = &mut set.workspaces[set.active]; for focused in focused_windows.iter() { raise_with_children(&mut workspace.floating_layer, focused); } @@ -213,6 +213,16 @@ impl Shell { m.window.set_activated(false); m.window.configure(); } + + for (i, workspace) in set.workspaces.iter().enumerate() { + if i == set.active { + continue; + } + for window in workspace.mapped() { + window.set_activated(false); + window.configure(); + } + } } } }