shell: Allow active workspace to be None

This commit is contained in:
Victoria Brekenfeld 2025-01-06 19:23:06 +01:00 committed by Victoria Brekenfeld
parent 23570ea9f4
commit db13eea91c
13 changed files with 230 additions and 167 deletions

View file

@ -222,7 +222,10 @@ impl ResizeForkGrab {
if let Some(output) = self.output.upgrade() {
let mut shell = data.common.shell.write().unwrap();
let tiling_layer = &mut shell.active_space_mut(&output).tiling_layer;
let Some(workspace) = shell.active_space_mut(&output) else {
return false;
};
let tiling_layer = &mut workspace.tiling_layer;
let gaps = tiling_layer.gaps();
let tree = &mut tiling_layer.queue.trees.back_mut().unwrap().0;