From dcacbb37c35ec6066f7cc5eb836b88c009617717 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 19 Feb 2013 21:50:40 -0500 Subject: [PATCH] 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 file changed, 3 insertions(+), 7 deletions(-) diff --git a/js/ui/background.js b/js/ui/background.js index 9d79e434b..8d2a9cce1 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'); }) });