[gnome-shell/wip/rstrode/rhel-7.9: 24/86] panel: Don't allow opening hidden menus via keybindings




commit f4ea069040ed6b74492fb621536aeace43aadac8
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Jan 23 23:55:12 2019 +0100

    panel: Don't allow opening hidden menus via keybindings
    
    We shouldn't allow toggling menus that aren't supported by the
    current session mode, but as indicators are hidden rather than
    destroyed on mode switches, it is not enough to check for an
    indicator's existence.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/851

 js/ui/panel.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 2f593247d9..02667f92f2 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -985,8 +985,8 @@ var Panel = new Lang.Class({
     },
 
     _toggleMenu(indicator) {
-        if (!indicator) // menu not supported by current session mode
-            return;
+        if (!indicator || !indicator.container.visible)
+            return; // menu not supported by current session mode
 
         let menu = indicator.menu;
         if (!indicator.actor.reactive)


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