diff --git a/src/shell/workspace.rs b/src/shell/workspace.rs index 0f855132..c8d9151c 100644 --- a/src/shell/workspace.rs +++ b/src/shell/workspace.rs @@ -1242,11 +1242,7 @@ impl Workspace { Option, Option>, )> { - let surface = self.fullscreen.take()?; - if surface.ended_at.is_some() { - self.fullscreen = Some(surface); - return None; - } + let surface = self.fullscreen.take_if(|s| s.ended_at.is_none())?; for focus_stack in self.focus_stack.0.values_mut() { focus_stack.retain(|t| t != &surface.surface);