shell: Refresh focus-stacks after swap

This commit is contained in:
Victoria Brekenfeld 2023-09-11 21:11:34 +02:00
parent 6b4eb83af5
commit 7ba52d7162
2 changed files with 15 additions and 5 deletions

View file

@ -108,6 +108,13 @@ impl Workspace {
self.tiling_layer.refresh();
}
pub fn refresh_focus_stack(&mut self) {
let windows: Vec<CosmicMapped> = self.mapped().cloned().collect();
for stack in self.focus_stack.0.values_mut() {
stack.retain(|w| windows.contains(w));
}
}
pub fn animations_going(&self) -> bool {
self.tiling_layer.animations_going()
}