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
This commit is contained in:
Florian Müllner 2019-01-23 23:55:12 +01:00 committed by Ray Strode
parent ee97f73521
commit 511e8c6584

View File

@ -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)