Skip to content

Commit ef1fe24

Browse files
authored
Merge pull request #69 from NathanBaulch/emptyjson
2 parents 678d7fd + 3335634 commit ef1fe24

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

watchers/src/watchers/gnome_window.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ impl WindowWatcher {
3838
.body()
3939
.deserialize()
4040
.with_context(|| "DBus interface cannot be parsed as string")?;
41+
if json == "{}" {
42+
trace!("No window is active (empty JSON)");
43+
return Ok(WindowData::default());
44+
}
4145
serde_json::from_str(&json).with_context(|| {
4246
format!("DBus interface org.gnome.shell.extensions.FocusedWindow returned wrong JSON: {json}")
4347
})

0 commit comments

Comments
 (0)