popupMenu: Close menus on session mode changes

We are already closing top bar menus on session mode changes, but
as this behavior makes sense for any other menus as well - dash
context menus or the background menu for instance - just generalize
the behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=787676
This commit is contained in:
Florian Müllner 2017-09-14 17:12:12 +02:00
parent 0b02f757f8
commit 7da5a76aaa
2 changed files with 1 additions and 2 deletions

View File

@ -1084,8 +1084,6 @@ var Panel = new Lang.Class({
let indicator = this.statusArea[role];
if (!indicator)
continue;
if (indicator.menu)
indicator.menu.close();
indicator.container.hide();
}
},

View File

@ -465,6 +465,7 @@ var PopupMenuBase = new Lang.Class({
_sessionUpdated: function() {
this._setSettingsVisibility(Main.sessionMode.allowSettings);
this.close();
},
addAction: function(title, callback, icon) {