tree: remove hidden, unused workspaces
This commit is contained in:
parent
871827fdde
commit
70cc24107b
4 changed files with 45 additions and 0 deletions
|
|
@ -180,6 +180,10 @@ impl OutputNode {
|
|||
}
|
||||
collect_kb_foci2(old.clone(), &mut seats);
|
||||
old.set_visible(false);
|
||||
if old.is_empty() {
|
||||
old.clear();
|
||||
self.state.workspaces.remove(&old.name);
|
||||
}
|
||||
}
|
||||
ws.set_visible(true);
|
||||
if let Some(fs) = ws.fullscreen.get() {
|
||||
|
|
|
|||
|
|
@ -47,6 +47,10 @@ impl WorkspaceNode {
|
|||
self.container.set(Some(container.clone()));
|
||||
}
|
||||
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.stacked.is_empty() && self.fullscreen.get().is_none() && self.container.get().is_none()
|
||||
}
|
||||
|
||||
pub fn stacked_visible(&self) -> bool {
|
||||
self.visible.get() && self.fullscreen.get().is_none()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue