[gnome-shell] popupMenu: Use TOPBAR_POPUP action mode for all menus
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] popupMenu: Use TOPBAR_POPUP action mode for all menus
- Date: Mon, 23 Feb 2015 20:39:50 +0000 (UTC)
commit c79d24b60e773262091023feb6ee1b3deef1c471
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Feb 23 20:07:04 2015 +0100
popupMenu: Use TOPBAR_POPUP action mode for all menus
When it comes to keybindings or gestures, there's not really a good
reason why popups associated with the top bar should behave differently
from any other shell menus. Just set the action mode generically for
all menus, so actions like screenshots or media-keys start working
with menus like the background- or app launcher context menus.
https://bugzilla.gnome.org/show_bug.cgi?id=745039
js/ui/panel.js | 2 +-
js/ui/popupMenu.js | 2 ++
src/shell-action-modes.h | 5 ++---
3 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 6e4fee3..c1ca129 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -723,7 +723,7 @@ const Panel = new Lang.Class({
this.statusArea = {};
- this.menuManager = new PopupMenu.PopupMenuManager(this, { actionMode: Shell.ActionMode.TOPBAR_POPUP
});
+ this.menuManager = new PopupMenu.PopupMenuManager(this);
this._leftBox = new St.BoxLayout({ name: 'panelLeft' });
this.actor.add_actor(this._leftBox);
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index ffa78e5..d4bb2ac 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -1159,6 +1159,8 @@ const PopupMenuManager = new Lang.Class({
Name: 'PopupMenuManager',
_init: function(owner, grabParams) {
+ grabParams = Params.parse(grabParams,
+ { actionMode: Shell.ActionMode.POPUP });
this._owner = owner;
this._grabHelper = new GrabHelper.GrabHelper(owner.actor, grabParams);
this._menus = [];
diff --git a/src/shell-action-modes.h b/src/shell-action-modes.h
index cff1d12..bf21d34 100644
--- a/src/shell-action-modes.h
+++ b/src/shell-action-modes.h
@@ -15,8 +15,7 @@
* @SHELL_ACTION_MODE_SYSTEM_MODAL: allow action when a system modal
* dialog (e.g. authentification or session dialogs) is open
* @SHELL_ACTION_MODE_LOOKING_GLASS: allow action in looking glass
- * @SHELL_ACTION_MODE_TOPBAR_POPUP: allow action while a top bar menu
- * is open
+ * @SHELL_ACTION_MODE_POPUP: allow action while a shell menu is open
* @SHELL_ACTION_MODE_ALL: always allow action
*
* Controls in which GNOME Shell states an action (like keybindings and gestures)
@@ -32,7 +31,7 @@ typedef enum {
SHELL_ACTION_MODE_MESSAGE_TRAY = 1 << 5,
SHELL_ACTION_MODE_SYSTEM_MODAL = 1 << 6,
SHELL_ACTION_MODE_LOOKING_GLASS = 1 << 7,
- SHELL_ACTION_MODE_TOPBAR_POPUP = 1 << 8,
+ SHELL_ACTION_MODE_POPUP = 1 << 8,
SHELL_ACTION_MODE_ALL = ~0,
} ShellActionMode;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]