diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 09eeac105..b9f5fef46 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -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; }