shell: Lift/refactor (un)maximize, consider sticky windows

This commit is contained in:
Victoria Brekenfeld 2023-12-20 20:45:47 +00:00 committed by Victoria Brekenfeld
parent d0136194f4
commit 807f63bb72
7 changed files with 86 additions and 86 deletions

View file

@ -274,13 +274,7 @@ impl Program for CosmicWindowInternal {
if let Some(mapped) =
state.common.shell.element_for_wl_surface(&surface).cloned()
{
if let Some(workspace) = state.common.shell.space_for_mut(&mapped) {
let (window, _) = mapped
.windows()
.find(|(w, _)| w.wl_surface().as_ref() == Some(&surface))
.unwrap();
workspace.maximize_toggle(&window)
}
state.common.shell.maximize_toggle(&mapped)
}
});
}