panel: Add keybinding mode for top bar popups and use it
Allow some keybindings to still work while a top bar menu is open by assigning it a keybinding mode. https://bugzilla.gnome.org/show_bug.cgi?id=698938
This commit is contained in:
parent
5c40307745
commit
4a5ff5dcfb
@ -958,7 +958,7 @@ const Panel = new Lang.Class({
|
|||||||
|
|
||||||
this.statusArea = {};
|
this.statusArea = {};
|
||||||
|
|
||||||
this.menuManager = new PopupMenu.PopupMenuManager(this);
|
this.menuManager = new PopupMenu.PopupMenuManager(this, { keybindingMode: Shell.KeyBindingMode.TOPBAR_POPUP });
|
||||||
|
|
||||||
this._leftBox = new St.BoxLayout({ name: 'panelLeft' });
|
this._leftBox = new St.BoxLayout({ name: 'panelLeft' });
|
||||||
this.actor.add_actor(this._leftBox);
|
this.actor.add_actor(this._leftBox);
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
* @SHELL_KEYBINDING_MODE_SYSTEM_MODAL: allow keybinding when a system modal
|
* @SHELL_KEYBINDING_MODE_SYSTEM_MODAL: allow keybinding when a system modal
|
||||||
* dialog (e.g. authentification or session dialogs) is open
|
* dialog (e.g. authentification or session dialogs) is open
|
||||||
* @SHELL_KEYBINDING_MODE_LOOKING_GLASS: allow keybinding in looking glass
|
* @SHELL_KEYBINDING_MODE_LOOKING_GLASS: allow keybinding in looking glass
|
||||||
|
* @SHELL_KEYBINDING_MODE_TOPBAR_POPUP: allow keybinding while a top bar menu
|
||||||
|
* is open
|
||||||
* @SHELL_KEYBINDING_MODE_ALL: always allow keybinding
|
* @SHELL_KEYBINDING_MODE_ALL: always allow keybinding
|
||||||
*
|
*
|
||||||
* Controls in which GNOME Shell states a keybinding should be handled.
|
* Controls in which GNOME Shell states a keybinding should be handled.
|
||||||
@ -29,6 +31,7 @@ typedef enum {
|
|||||||
SHELL_KEYBINDING_MODE_MESSAGE_TRAY = 1 << 5,
|
SHELL_KEYBINDING_MODE_MESSAGE_TRAY = 1 << 5,
|
||||||
SHELL_KEYBINDING_MODE_SYSTEM_MODAL = 1 << 6,
|
SHELL_KEYBINDING_MODE_SYSTEM_MODAL = 1 << 6,
|
||||||
SHELL_KEYBINDING_MODE_LOOKING_GLASS = 1 << 7,
|
SHELL_KEYBINDING_MODE_LOOKING_GLASS = 1 << 7,
|
||||||
|
SHELL_KEYBINDING_MODE_TOPBAR_POPUP = 1 << 8,
|
||||||
|
|
||||||
SHELL_KEYBINDING_MODE_ALL = ~0,
|
SHELL_KEYBINDING_MODE_ALL = ~0,
|
||||||
} ShellKeyBindingMode;
|
} ShellKeyBindingMode;
|
||||||
|
Loading…
Reference in New Issue
Block a user