Use _onDestroy() handlers for cleanup in delegates
Unify the style of <delegate>.destroy() methods to only contain a call to <delegate>.actor.destroy() and handle additional cleanup in a _onDestroy() signal handler. https://bugzilla.gnome.org/show_bug.cgi?id=609454
This commit is contained in:
@ -581,6 +581,9 @@ Workspace.prototype = {
|
||||
|
||||
this.actor = new Clutter.Group();
|
||||
this.actor._delegate = this;
|
||||
|
||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
||||
|
||||
// Auto-sizing is unreliable in the presence of ClutterClone, so rather than
|
||||
// implicitly counting on the workspace actor to be sized to the size of the
|
||||
// included desktop actor clone, set the size explicitly to the screen size.
|
||||
@ -1330,10 +1333,11 @@ Workspace.prototype = {
|
||||
},
|
||||
|
||||
destroy : function() {
|
||||
Tweener.removeTweens(this.actor);
|
||||
this.actor.destroy();
|
||||
this.actor = null;
|
||||
this._windowOverlaysGroup.destroy();
|
||||
},
|
||||
|
||||
_onDestroy: function(actor) {
|
||||
Tweener.removeTweens(actor);
|
||||
|
||||
this._metaWorkspace.disconnect(this._windowAddedId);
|
||||
this._metaWorkspace.disconnect(this._windowRemovedId);
|
||||
|
Reference in New Issue
Block a user