diff --git a/js/ui/windowAttentionHandler.js b/js/ui/windowAttentionHandler.js index abdb8a444..a9a7111ba 100644 --- a/js/ui/windowAttentionHandler.js +++ b/js/ui/windowAttentionHandler.js @@ -69,8 +69,6 @@ var Source = class WindowAttentionSource extends MessageTray.Source { () => { this.destroy(); })); this.signalIDs.push(this._window.connect('unmanaged', () => { this.destroy(); })); - - this.connect('destroy', this._onDestroy.bind(this)); } _sync() { @@ -79,13 +77,6 @@ var Source = class WindowAttentionSource extends MessageTray.Source { this.destroy(); } - _onDestroy() { - for(let i = 0; i < this.signalIDs.length; i++) { - this._window.disconnect(this.signalIDs[i]); - } - this.signalIDs = []; - } - _createPolicy() { if (this._app && this._app.get_app_info()) { let id = this._app.get_id().replace(/\.desktop$/,''); @@ -99,6 +90,14 @@ var Source = class WindowAttentionSource extends MessageTray.Source { return this._app.create_icon_texture(size); } + destroy(params) { + for (let i = 0; i < this.signalIDs.length; i++) + this._window.disconnect(this.signalIDs[i]); + this.signalIDs = []; + + super.destroy(params); + } + open() { Main.activateWindow(this._window); }