[gnome-shell] background: destroy actors don't remove them from their parent



commit dcacbb37c35ec6066f7cc5eb836b88c009617717
Author: Ray Strode <rstrode redhat com>
Date:   Tue Feb 19 21:50:40 2013 -0500

    background: destroy actors don't remove them from their parent
    
    This reads better, and it also fixes a warning when background
    is changed while transitioning to the overview.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=694227

 js/ui/background.js |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/background.js b/js/ui/background.js
index 9d79e43..8d2a9cc 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -664,16 +664,12 @@ const BackgroundManager = new Lang.Class({
             this.background.disconnect(this._changedSignalId);
 
         if (this._newBackground) {
-            let container = this._newBackground.actor.get_parent();
-            if (container)
-                container.remove_actor(this._newBackground.actor);
+            this._newBackground.actor.destroy();
             this._newBackground = null;
         }
 
         if (this.background) {
-            let container = this.background.actor.get_parent();
-            if (container)
-                container.remove_actor(this.background.actor);
+            this.background.actor.destroy();
             this.background = null;
         }
     },
@@ -695,7 +691,7 @@ const BackgroundManager = new Lang.Class({
                                    onComplete: Lang.bind(this, function() {
                                        this.background = newBackground;
                                        this._newBackground = null;
-                                       this._container.remove_actor(background.actor);
+                                       background.actor.destroy();
                                        this.emit('changed');
                                    })
                                  });


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