From 3335634f10760472a12ed048f07fceb7f92c696c Mon Sep 17 00:00:00 2001 From: Nathan Baulch Date: Fri, 20 Feb 2026 13:14:19 +1100 Subject: [PATCH] gnome: interpret {} as valid state with no windows focused --- watchers/src/watchers/gnome_window.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/watchers/src/watchers/gnome_window.rs b/watchers/src/watchers/gnome_window.rs index bfe1b6b..7983720 100644 --- a/watchers/src/watchers/gnome_window.rs +++ b/watchers/src/watchers/gnome_window.rs @@ -38,6 +38,10 @@ impl WindowWatcher { .body() .deserialize() .with_context(|| "DBus interface cannot be parsed as string")?; + if json == "{}" { + trace!("No window is active (empty JSON)"); + return Ok(WindowData::default()); + } serde_json::from_str(&json).with_context(|| { format!("DBus interface org.gnome.shell.extensions.FocusedWindow returned wrong JSON: {json}") })