diff --git a/unite@hardpixel.eu/modules/appMenu.js b/unite@hardpixel.eu/modules/appMenu.js index e76699f..dcee6ba 100644 --- a/unite@hardpixel.eu/modules/appMenu.js +++ b/unite@hardpixel.eu/modules/appMenu.js @@ -41,6 +41,10 @@ var AppMenu = new Lang.Class({ 'notify::focus-app', Lang.bind(this, this._showMenu) ); + this._ovHandlerID = Main.overview.connect( + 'hiding', Lang.bind(this, this._showMenu) + ); + this._wmHandlerIDs.push(global.window_manager.connect( 'destroy', Lang.bind(this, this._updateMenu) )); @@ -75,6 +79,11 @@ var AppMenu = new Lang.Class({ delete this._wtHandlerID; } + if (this._ovHandlerID) { + Main.overview.disconnect(this._ovHandlerID); + delete this._ovHandlerID; + } + this._wmHandlerIDs.forEach(function (handler) { global.window_manager.disconnect(handler); });