workspaceThumbnail: always destroy bgManager when destroyed
Right now we only destroy the bgManager object when the workspaceThumbnail is explicitly destroy with its destroy() method. This commit makes sure bgManager gets destroyed when the workspaceThumbnail actor is destroyed without calling destroy(). https://bugzilla.gnome.org/show_bug.cgi?id=696157
This commit is contained in:
parent
f920fd8b6f
commit
18d850d7d6
@ -384,9 +384,8 @@ const WorkspaceThumbnail = new Lang.Class({
|
||||
},
|
||||
|
||||
destroy : function() {
|
||||
if (this.actor)
|
||||
this.actor.destroy();
|
||||
this._bgManager.destroy();
|
||||
this._bgManager = null;
|
||||
},
|
||||
|
||||
workspaceRemoved : function() {
|
||||
@ -407,6 +406,11 @@ const WorkspaceThumbnail = new Lang.Class({
|
||||
_onDestroy: function(actor) {
|
||||
this.workspaceRemoved();
|
||||
|
||||
if (this._bgManager) {
|
||||
this._bgManager.destroy();
|
||||
this._bgManager = null;
|
||||
}
|
||||
|
||||
this._windows = [];
|
||||
this.actor = null;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user