Commit 8e51fee5 authored by Ray Strode's avatar Ray Strode Committed by Florian Müllner

windowManager: ensure actor resize clone dies with actor

If a window gets destroyed right before it's resize
animation starts the user can get confronted with an undead
zombie clone that doesn't go away.

This commit makes sure said clones get reaped with their
actors.

#1166
parent 9d6fcfdc
Pipeline #75929 passed with stages
in 5 minutes and 46 seconds
......@@ -1488,8 +1488,13 @@ var WindowManager = class {
if (this._clearAnimationInfo(actor))
this._shellwm.completed_size_change(actor);
let destroyId = actor.connect('destroy', () => {
this._clearAnimationInfo(actor);
});
actor.__animationInfo = { clone: actorClone,
oldRect: oldFrameRect };
oldRect: oldFrameRect,
destroyId: destroyId };
}
_sizeChangedWindow(shellwm, actor) {
......@@ -1550,6 +1555,7 @@ var WindowManager = class {
_clearAnimationInfo(actor) {
if (actor.__animationInfo) {
actor.__animationInfo.clone.destroy();
actor.disconnect(actor.__animationInfo.destroyId);
delete actor.__animationInfo;
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment