[mutter] Don't automatically add bindings for -backward actions
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Don't automatically add bindings for -backward actions
- Date: Sun, 17 Aug 2014 17:32:19 +0000 (UTC)
commit bb59b8c2491251cb911f44093e4b832961f063df
Author: Christophe Fergeau <cfergeau redhat com>
Date: Fri Jun 27 16:07:44 2014 +0200
Don't automatically add bindings for -backward actions
Currently the bindings for {switch,cycle}.* actions are created with the
META_KEY_BINDING_REVERSES flag so that <shift>+binding triggers the
reverse action. However, gnome-control-center does not know about this
kind of implicit bindings, and, for example, cannot warn when the user
tries to setup a conflicting <shift>+xxx binding.
These backward <shift> bindings are being explicitly set in
gsettings-desktop-schemas, so the META_KEY_BINDING_REVERSES annotation
can be removed for them from mutter.
https://bugzilla.gnome.org/show_bug.cgi?id=732385
src/core/keybindings.c | 32 ++++++++++++++------------------
1 files changed, 14 insertions(+), 18 deletions(-)
---
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index 089b582..8fc28d4 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -3414,8 +3414,6 @@ meta_keybindings_set_custom_handler (const gchar *name,
static void
init_builtin_key_bindings (MetaDisplay *display)
{
-#define REVERSES_AND_REVERSED (META_KEY_BINDING_REVERSES | \
- META_KEY_BINDING_IS_REVERSED)
GSettings *common_keybindings = g_settings_new (SCHEMA_COMMON_KEYBINDINGS);
GSettings *mutter_keybindings = g_settings_new (SCHEMA_MUTTER_KEYBINDINGS);
GSettings *mutter_wayland_keybindings = g_settings_new (SCHEMA_MUTTER_WAYLAND_KEYBINDINGS);
@@ -3543,98 +3541,98 @@ init_builtin_key_bindings (MetaDisplay *display)
add_builtin_keybinding (display,
"switch-group",
common_keybindings,
- META_KEY_BINDING_REVERSES,
+ META_KEY_BINDING_NONE,
META_KEYBINDING_ACTION_SWITCH_GROUP,
handle_switch, META_TAB_LIST_GROUP);
add_builtin_keybinding (display,
"switch-group-backward",
common_keybindings,
- REVERSES_AND_REVERSED,
+ META_KEY_BINDING_IS_REVERSED,
META_KEYBINDING_ACTION_SWITCH_GROUP_BACKWARD,
handle_switch, META_TAB_LIST_GROUP);
add_builtin_keybinding (display,
"switch-applications",
common_keybindings,
- META_KEY_BINDING_REVERSES,
+ META_KEY_BINDING_NONE,
META_KEYBINDING_ACTION_SWITCH_APPLICATIONS,
handle_switch, META_TAB_LIST_NORMAL);
add_builtin_keybinding (display,
"switch-applications-backward",
common_keybindings,
- REVERSES_AND_REVERSED,
+ META_KEY_BINDING_IS_REVERSED,
META_KEYBINDING_ACTION_SWITCH_APPLICATIONS_BACKWARD,
handle_switch, META_TAB_LIST_NORMAL);
add_builtin_keybinding (display,
"switch-windows",
common_keybindings,
- META_KEY_BINDING_REVERSES,
+ META_KEY_BINDING_NONE,
META_KEYBINDING_ACTION_SWITCH_WINDOWS,
handle_switch, META_TAB_LIST_NORMAL);
add_builtin_keybinding (display,
"switch-windows-backward",
common_keybindings,
- REVERSES_AND_REVERSED,
+ META_KEY_BINDING_IS_REVERSED,
META_KEYBINDING_ACTION_SWITCH_WINDOWS_BACKWARD,
handle_switch, META_TAB_LIST_NORMAL);
add_builtin_keybinding (display,
"switch-panels",
common_keybindings,
- META_KEY_BINDING_REVERSES,
+ META_KEY_BINDING_NONE,
META_KEYBINDING_ACTION_SWITCH_PANELS,
handle_switch, META_TAB_LIST_DOCKS);
add_builtin_keybinding (display,
"switch-panels-backward",
common_keybindings,
- REVERSES_AND_REVERSED,
+ META_KEY_BINDING_IS_REVERSED,
META_KEYBINDING_ACTION_SWITCH_PANELS_BACKWARD,
handle_switch, META_TAB_LIST_DOCKS);
add_builtin_keybinding (display,
"cycle-group",
common_keybindings,
- META_KEY_BINDING_REVERSES,
+ META_KEY_BINDING_NONE,
META_KEYBINDING_ACTION_CYCLE_GROUP,
handle_cycle, META_TAB_LIST_GROUP);
add_builtin_keybinding (display,
"cycle-group-backward",
common_keybindings,
- REVERSES_AND_REVERSED,
+ META_KEY_BINDING_IS_REVERSED,
META_KEYBINDING_ACTION_CYCLE_GROUP_BACKWARD,
handle_cycle, META_TAB_LIST_GROUP);
add_builtin_keybinding (display,
"cycle-windows",
common_keybindings,
- META_KEY_BINDING_REVERSES,
+ META_KEY_BINDING_NONE,
META_KEYBINDING_ACTION_CYCLE_WINDOWS,
handle_cycle, META_TAB_LIST_NORMAL);
add_builtin_keybinding (display,
"cycle-windows-backward",
common_keybindings,
- REVERSES_AND_REVERSED,
+ META_KEY_BINDING_IS_REVERSED,
META_KEYBINDING_ACTION_CYCLE_WINDOWS_BACKWARD,
handle_cycle, META_TAB_LIST_NORMAL);
add_builtin_keybinding (display,
"cycle-panels",
common_keybindings,
- META_KEY_BINDING_REVERSES,
+ META_KEY_BINDING_NONE,
META_KEYBINDING_ACTION_CYCLE_PANELS,
handle_cycle, META_TAB_LIST_DOCKS);
add_builtin_keybinding (display,
"cycle-panels-backward",
common_keybindings,
- REVERSES_AND_REVERSED,
+ META_KEY_BINDING_IS_REVERSED,
META_KEYBINDING_ACTION_CYCLE_PANELS_BACKWARD,
handle_cycle, META_TAB_LIST_DOCKS);
@@ -3723,8 +3721,6 @@ init_builtin_key_bindings (MetaDisplay *display)
}
#endif /* HAVE_NATIVE_BACKEND */
-#undef REVERSES_AND_REVERSED
-
/************************ PER WINDOW BINDINGS ************************/
/* These take a window as an extra parameter; they have no effect
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]