diff --git a/src/shell/layout/floating/mod.rs b/src/shell/layout/floating/mod.rs index f2f475a4..df94fd86 100644 --- a/src/shell/layout/floating/mod.rs +++ b/src/shell/layout/floating/mod.rs @@ -642,7 +642,14 @@ impl FloatingLayout { self.space .map_element(mapped.clone(), position.as_logical(), true); self.space.refresh(); - let target_geometry = self.space.element_geometry(&mapped).unwrap().as_local(); + // The window can disappear between `map_element` and the geometry + // lookup if the client crashes mid-unminimize (race observed in + // pop-os/cosmic-comp#2332). Skip the animation rather than panic — + // the window is already gone, there's nothing to animate. + let Some(target_geometry) = self.space.element_geometry(&mapped) else { + return; + }; + let target_geometry = target_geometry.as_local(); self.animations.insert( mapped,