[gnome-shell/wip/reap-the-undead-clones: 177/177] windowManager: ensure actor resize clone dies with actor



commit ab6f4b923d0d78cc78ebaae08893aedffbbd6301
Author: Ray Strode <rstrode redhat com>
Date:   Thu Feb 7 14:27:35 2019 -0500

    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.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/1166

 js/ui/windowManager.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index ea9493d6f..4f226a096 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -1468,8 +1468,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) {
@@ -1530,6 +1535,7 @@ var WindowManager = class {
     _clearAnimationInfo(actor) {
         if (actor.__animationInfo) {
             actor.__animationInfo.clone.destroy();
+            actor.disconnect(actor.__animationInfo.destroyId);
             delete actor.__animationInfo;
             return true;
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]