From 7da5a76aaae82bf5bf6c74c77b2e95b49461f8e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 14 Sep 2017 17:12:12 +0200 Subject: [PATCH] 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 --- js/ui/panel.js | 2 -- js/ui/popupMenu.js | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/js/ui/panel.js b/js/ui/panel.js index dc6536655..d7c8397b5 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -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(); } }, diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index a2a4df340..d00132ff9 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -465,6 +465,7 @@ var PopupMenuBase = new Lang.Class({ _sessionUpdated: function() { this._setSettingsVisibility(Main.sessionMode.allowSettings); + this.close(); }, addAction: function(title, callback, icon) {