Blame SOURCES/0001-windowManager-ensure-actor-resize-clone-dies-with-ac.patch

067a6b
From ce368a83a782931c56239daa99e3dc96d1de41e2 Mon Sep 17 00:00:00 2001
067a6b
From: Ray Strode <rstrode@redhat.com>
067a6b
Date: Thu, 7 Feb 2019 14:27:35 -0500
067a6b
Subject: [PATCH] windowManager: ensure actor resize clone dies with actor
067a6b
067a6b
If a window gets destroyed right before it's resize
067a6b
animation starts the user can get confronted with an undead
067a6b
zombie clone that doesn't go away.
067a6b
067a6b
This commit makes sure said clones get reaped with their
067a6b
actors.
067a6b
067a6b
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1166
067a6b
---
067a6b
 js/ui/windowManager.js | 8 +++++++-
067a6b
 1 file changed, 7 insertions(+), 1 deletion(-)
067a6b
067a6b
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
067a6b
index b439b3c0a..3fda973f1 100644
067a6b
--- a/js/ui/windowManager.js
067a6b
+++ b/js/ui/windowManager.js
067a6b
@@ -1318,8 +1318,13 @@ var WindowManager = new Lang.Class({
067a6b
         if (this._clearAnimationInfo(actor))
067a6b
             this._shellwm.completed_size_change(actor);
067a6b
 
067a6b
+        let destroyId = actor.connect('destroy', () => {
067a6b
+            this._clearAnimationInfo(actor);
067a6b
+        });
067a6b
+
067a6b
         actor.__animationInfo = { clone: actorClone,
067a6b
-                                  oldRect: oldFrameRect };
067a6b
+                                  oldRect: oldFrameRect,
067a6b
+                                  destroyId: destroyId };
067a6b
     },
067a6b
 
067a6b
     _sizeChangedWindow(shellwm, actor) {
067a6b
@@ -1380,6 +1385,7 @@ var WindowManager = new Lang.Class({
067a6b
     _clearAnimationInfo(actor) {
067a6b
         if (actor.__animationInfo) {
067a6b
             actor.__animationInfo.clone.destroy();
067a6b
+            actor.disconnect(actor.__animationInfo.destroyId);
067a6b
             delete actor.__animationInfo;
067a6b
             return true;
067a6b
         }
067a6b
-- 
067a6b
2.23.0
067a6b