diff --git a/unite@hardpixel.eu/helpers.js b/unite@hardpixel.eu/helpers.js index 302cd28..32f8f10 100644 --- a/unite@hardpixel.eu/helpers.js +++ b/unite@hardpixel.eu/helpers.js @@ -68,6 +68,18 @@ function collectWindowButtons(layout_items) { return items; } +function overviewSignals(handlers) { + let signals = []; + + Main.overview._signalConnections.forEach(function (item) { + if (handlers.indexOf(item.id) > -1 && !item.disconnected) { + signals.push(item.id); + } + }); + + return signals; +} + function isMaximized(win, match_state) { let check = false; let flags = Meta.MaximizeFlags; diff --git a/unite@hardpixel.eu/modules/activitiesButton.js b/unite@hardpixel.eu/modules/activitiesButton.js index 4c30749..b0d69ca 100644 --- a/unite@hardpixel.eu/modules/activitiesButton.js +++ b/unite@hardpixel.eu/modules/activitiesButton.js @@ -7,6 +7,7 @@ const Panel = Main.panel; const AppMenu = Panel.statusArea.appMenu; const ExtensionUtils = imports.misc.extensionUtils; const Unite = ExtensionUtils.getCurrentExtension(); +const Helpers = Unite.imports.helpers; const Convenience = Unite.imports.convenience; var ActivitiesButton = new Lang.Class({ @@ -44,6 +45,8 @@ var ActivitiesButton = new Lang.Class({ }, _disconnectSignals: function() { + this._ovHandlerIDs = Helpers.overviewSignals(this._ovHandlerIDs); + if (this._wtHandlerID) { WindowTracker.disconnect(this._wtHandlerID); delete this._wtHandlerID; diff --git a/unite@hardpixel.eu/modules/desktopName.js b/unite@hardpixel.eu/modules/desktopName.js index 4cf440b..997a536 100644 --- a/unite@hardpixel.eu/modules/desktopName.js +++ b/unite@hardpixel.eu/modules/desktopName.js @@ -8,6 +8,7 @@ const Panel = Main.panel; const AppMenu = Panel.statusArea.appMenu; const ExtensionUtils = imports.misc.extensionUtils; const Unite = ExtensionUtils.getCurrentExtension(); +const Helpers = Unite.imports.helpers; const Convenience = Unite.imports.convenience; var DesktopName = new Lang.Class({ @@ -44,6 +45,8 @@ var DesktopName = new Lang.Class({ }, _disconnectSignals: function() { + this._ovHandlerIDs = Helpers.overviewSignals(this._ovHandlerIDs); + if (this._wtHandlerID) { WindowTracker.disconnect(this._wtHandlerID); delete this._wtHandlerID; diff --git a/unite@hardpixel.eu/modules/windowButtons.js b/unite@hardpixel.eu/modules/windowButtons.js index c28680f..50667e9 100644 --- a/unite@hardpixel.eu/modules/windowButtons.js +++ b/unite@hardpixel.eu/modules/windowButtons.js @@ -53,6 +53,8 @@ var WindowButtons = new Lang.Class({ }, _disconnectSignals: function() { + this._ovHandlerIDs = Helpers.overviewSignals(this._ovHandlerIDs); + if (this._dsHandlerID) { global.display.disconnect(this._dsHandlerID); delete this._dsHandlerID;