From 511e8c658445377b044c6dfb241709142c97a8ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 23 Jan 2019 23:55:12 +0100 Subject: [PATCH] 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 66588f9c1..5b2ee63d8 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -998,8 +998,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)