feat(wm): drop empty containers on ws update

We shouldn't ever have empty containers, but never say never because
someone on the Discord has an empty container with no Windows that
continues to take up a tile. This commit adds a call to drop all
containers without any windows whenever Workspace::update is called.
This commit is contained in:
LGUG2Z
2025-04-07 13:49:32 -07:00
parent 6db73151f7
commit 2f5fead85e

View File

@@ -480,6 +480,9 @@ impl Workspace {
return Ok(());
}
// make sure we are never holding on to empty containers
self.containers_mut().retain(|c| !c.windows().is_empty());
let container_padding = self
.container_padding()
.or(self.globals().container_padding)