[gnome-shell] popupMenu: Close menus on session mode changes



commit 7da5a76aaae82bf5bf6c74c77b2e95b49461f8e0
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Sep 14 17:12:12 2017 +0200

    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 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index dc65366..d7c8397 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 a2a4df3..d00132f 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) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]