floating: don't panic if window disappears mid-unminimize
Signed-off-by: SAY-5 <say.apm35@gmail.com>
This commit is contained in:
parent
836ccbaa0b
commit
69bb35e336
1 changed files with 8 additions and 1 deletions
|
|
@ -642,7 +642,14 @@ impl FloatingLayout {
|
||||||
self.space
|
self.space
|
||||||
.map_element(mapped.clone(), position.as_logical(), true);
|
.map_element(mapped.clone(), position.as_logical(), true);
|
||||||
self.space.refresh();
|
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(
|
self.animations.insert(
|
||||||
mapped,
|
mapped,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue