From ef0d7bbc631933b923f2d6b2e831e48a605e4513 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Mon, 29 Jul 2024 22:14:47 -0700 Subject: [PATCH] Close workspaces view if window spawns while open We may want to adjust this if it sometimes leads to confusing behavior. This may be better for now anyway. Fixes https://github.com/pop-os/cosmic-workspaces-epoch/issues/28. --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index cfd956c..e8ddcb2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -435,6 +435,10 @@ impl Application for App { info, img: None, }); + // Close workspaces view if a window spawns while open + if self.visible { + return self.hide(); + } } backend::Event::UpdateToplevel(handle, info) => { if let Some(toplevel) =