menu: Allow toggling sticky state

This commit is contained in:
Victoria Brekenfeld 2023-12-20 20:19:42 +00:00 committed by Victoria Brekenfeld
parent e0d207fbe1
commit d2e394b957
7 changed files with 187 additions and 24 deletions

View file

@ -58,6 +58,10 @@ impl<'a> FocusStackMut<'a> {
self.0.insert(window.clone());
}
pub fn remove(&mut self, window: &CosmicMapped) {
self.0.retain(|w| w != window);
}
pub fn last(&self) -> Option<&CosmicMapped> {
self.0.iter().rev().find(|w| w.alive())
}