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
This commit is contained in:
parent
c5c6b2257f
commit
bb59b8c249
@ -3414,8 +3414,6 @@ meta_keybindings_set_custom_handler (const gchar *name,
|
|||||||
static void
|
static void
|
||||||
init_builtin_key_bindings (MetaDisplay *display)
|
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 *common_keybindings = g_settings_new (SCHEMA_COMMON_KEYBINDINGS);
|
||||||
GSettings *mutter_keybindings = g_settings_new (SCHEMA_MUTTER_KEYBINDINGS);
|
GSettings *mutter_keybindings = g_settings_new (SCHEMA_MUTTER_KEYBINDINGS);
|
||||||
GSettings *mutter_wayland_keybindings = g_settings_new (SCHEMA_MUTTER_WAYLAND_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,
|
add_builtin_keybinding (display,
|
||||||
"switch-group",
|
"switch-group",
|
||||||
common_keybindings,
|
common_keybindings,
|
||||||
META_KEY_BINDING_REVERSES,
|
META_KEY_BINDING_NONE,
|
||||||
META_KEYBINDING_ACTION_SWITCH_GROUP,
|
META_KEYBINDING_ACTION_SWITCH_GROUP,
|
||||||
handle_switch, META_TAB_LIST_GROUP);
|
handle_switch, META_TAB_LIST_GROUP);
|
||||||
|
|
||||||
add_builtin_keybinding (display,
|
add_builtin_keybinding (display,
|
||||||
"switch-group-backward",
|
"switch-group-backward",
|
||||||
common_keybindings,
|
common_keybindings,
|
||||||
REVERSES_AND_REVERSED,
|
META_KEY_BINDING_IS_REVERSED,
|
||||||
META_KEYBINDING_ACTION_SWITCH_GROUP_BACKWARD,
|
META_KEYBINDING_ACTION_SWITCH_GROUP_BACKWARD,
|
||||||
handle_switch, META_TAB_LIST_GROUP);
|
handle_switch, META_TAB_LIST_GROUP);
|
||||||
|
|
||||||
add_builtin_keybinding (display,
|
add_builtin_keybinding (display,
|
||||||
"switch-applications",
|
"switch-applications",
|
||||||
common_keybindings,
|
common_keybindings,
|
||||||
META_KEY_BINDING_REVERSES,
|
META_KEY_BINDING_NONE,
|
||||||
META_KEYBINDING_ACTION_SWITCH_APPLICATIONS,
|
META_KEYBINDING_ACTION_SWITCH_APPLICATIONS,
|
||||||
handle_switch, META_TAB_LIST_NORMAL);
|
handle_switch, META_TAB_LIST_NORMAL);
|
||||||
|
|
||||||
add_builtin_keybinding (display,
|
add_builtin_keybinding (display,
|
||||||
"switch-applications-backward",
|
"switch-applications-backward",
|
||||||
common_keybindings,
|
common_keybindings,
|
||||||
REVERSES_AND_REVERSED,
|
META_KEY_BINDING_IS_REVERSED,
|
||||||
META_KEYBINDING_ACTION_SWITCH_APPLICATIONS_BACKWARD,
|
META_KEYBINDING_ACTION_SWITCH_APPLICATIONS_BACKWARD,
|
||||||
handle_switch, META_TAB_LIST_NORMAL);
|
handle_switch, META_TAB_LIST_NORMAL);
|
||||||
|
|
||||||
add_builtin_keybinding (display,
|
add_builtin_keybinding (display,
|
||||||
"switch-windows",
|
"switch-windows",
|
||||||
common_keybindings,
|
common_keybindings,
|
||||||
META_KEY_BINDING_REVERSES,
|
META_KEY_BINDING_NONE,
|
||||||
META_KEYBINDING_ACTION_SWITCH_WINDOWS,
|
META_KEYBINDING_ACTION_SWITCH_WINDOWS,
|
||||||
handle_switch, META_TAB_LIST_NORMAL);
|
handle_switch, META_TAB_LIST_NORMAL);
|
||||||
|
|
||||||
add_builtin_keybinding (display,
|
add_builtin_keybinding (display,
|
||||||
"switch-windows-backward",
|
"switch-windows-backward",
|
||||||
common_keybindings,
|
common_keybindings,
|
||||||
REVERSES_AND_REVERSED,
|
META_KEY_BINDING_IS_REVERSED,
|
||||||
META_KEYBINDING_ACTION_SWITCH_WINDOWS_BACKWARD,
|
META_KEYBINDING_ACTION_SWITCH_WINDOWS_BACKWARD,
|
||||||
handle_switch, META_TAB_LIST_NORMAL);
|
handle_switch, META_TAB_LIST_NORMAL);
|
||||||
|
|
||||||
add_builtin_keybinding (display,
|
add_builtin_keybinding (display,
|
||||||
"switch-panels",
|
"switch-panels",
|
||||||
common_keybindings,
|
common_keybindings,
|
||||||
META_KEY_BINDING_REVERSES,
|
META_KEY_BINDING_NONE,
|
||||||
META_KEYBINDING_ACTION_SWITCH_PANELS,
|
META_KEYBINDING_ACTION_SWITCH_PANELS,
|
||||||
handle_switch, META_TAB_LIST_DOCKS);
|
handle_switch, META_TAB_LIST_DOCKS);
|
||||||
|
|
||||||
add_builtin_keybinding (display,
|
add_builtin_keybinding (display,
|
||||||
"switch-panels-backward",
|
"switch-panels-backward",
|
||||||
common_keybindings,
|
common_keybindings,
|
||||||
REVERSES_AND_REVERSED,
|
META_KEY_BINDING_IS_REVERSED,
|
||||||
META_KEYBINDING_ACTION_SWITCH_PANELS_BACKWARD,
|
META_KEYBINDING_ACTION_SWITCH_PANELS_BACKWARD,
|
||||||
handle_switch, META_TAB_LIST_DOCKS);
|
handle_switch, META_TAB_LIST_DOCKS);
|
||||||
|
|
||||||
add_builtin_keybinding (display,
|
add_builtin_keybinding (display,
|
||||||
"cycle-group",
|
"cycle-group",
|
||||||
common_keybindings,
|
common_keybindings,
|
||||||
META_KEY_BINDING_REVERSES,
|
META_KEY_BINDING_NONE,
|
||||||
META_KEYBINDING_ACTION_CYCLE_GROUP,
|
META_KEYBINDING_ACTION_CYCLE_GROUP,
|
||||||
handle_cycle, META_TAB_LIST_GROUP);
|
handle_cycle, META_TAB_LIST_GROUP);
|
||||||
|
|
||||||
add_builtin_keybinding (display,
|
add_builtin_keybinding (display,
|
||||||
"cycle-group-backward",
|
"cycle-group-backward",
|
||||||
common_keybindings,
|
common_keybindings,
|
||||||
REVERSES_AND_REVERSED,
|
META_KEY_BINDING_IS_REVERSED,
|
||||||
META_KEYBINDING_ACTION_CYCLE_GROUP_BACKWARD,
|
META_KEYBINDING_ACTION_CYCLE_GROUP_BACKWARD,
|
||||||
handle_cycle, META_TAB_LIST_GROUP);
|
handle_cycle, META_TAB_LIST_GROUP);
|
||||||
|
|
||||||
add_builtin_keybinding (display,
|
add_builtin_keybinding (display,
|
||||||
"cycle-windows",
|
"cycle-windows",
|
||||||
common_keybindings,
|
common_keybindings,
|
||||||
META_KEY_BINDING_REVERSES,
|
META_KEY_BINDING_NONE,
|
||||||
META_KEYBINDING_ACTION_CYCLE_WINDOWS,
|
META_KEYBINDING_ACTION_CYCLE_WINDOWS,
|
||||||
handle_cycle, META_TAB_LIST_NORMAL);
|
handle_cycle, META_TAB_LIST_NORMAL);
|
||||||
|
|
||||||
add_builtin_keybinding (display,
|
add_builtin_keybinding (display,
|
||||||
"cycle-windows-backward",
|
"cycle-windows-backward",
|
||||||
common_keybindings,
|
common_keybindings,
|
||||||
REVERSES_AND_REVERSED,
|
META_KEY_BINDING_IS_REVERSED,
|
||||||
META_KEYBINDING_ACTION_CYCLE_WINDOWS_BACKWARD,
|
META_KEYBINDING_ACTION_CYCLE_WINDOWS_BACKWARD,
|
||||||
handle_cycle, META_TAB_LIST_NORMAL);
|
handle_cycle, META_TAB_LIST_NORMAL);
|
||||||
|
|
||||||
add_builtin_keybinding (display,
|
add_builtin_keybinding (display,
|
||||||
"cycle-panels",
|
"cycle-panels",
|
||||||
common_keybindings,
|
common_keybindings,
|
||||||
META_KEY_BINDING_REVERSES,
|
META_KEY_BINDING_NONE,
|
||||||
META_KEYBINDING_ACTION_CYCLE_PANELS,
|
META_KEYBINDING_ACTION_CYCLE_PANELS,
|
||||||
handle_cycle, META_TAB_LIST_DOCKS);
|
handle_cycle, META_TAB_LIST_DOCKS);
|
||||||
|
|
||||||
add_builtin_keybinding (display,
|
add_builtin_keybinding (display,
|
||||||
"cycle-panels-backward",
|
"cycle-panels-backward",
|
||||||
common_keybindings,
|
common_keybindings,
|
||||||
REVERSES_AND_REVERSED,
|
META_KEY_BINDING_IS_REVERSED,
|
||||||
META_KEYBINDING_ACTION_CYCLE_PANELS_BACKWARD,
|
META_KEYBINDING_ACTION_CYCLE_PANELS_BACKWARD,
|
||||||
handle_cycle, META_TAB_LIST_DOCKS);
|
handle_cycle, META_TAB_LIST_DOCKS);
|
||||||
|
|
||||||
@ -3723,8 +3721,6 @@ init_builtin_key_bindings (MetaDisplay *display)
|
|||||||
}
|
}
|
||||||
#endif /* HAVE_NATIVE_BACKEND */
|
#endif /* HAVE_NATIVE_BACKEND */
|
||||||
|
|
||||||
#undef REVERSES_AND_REVERSED
|
|
||||||
|
|
||||||
/************************ PER WINDOW BINDINGS ************************/
|
/************************ PER WINDOW BINDINGS ************************/
|
||||||
|
|
||||||
/* These take a window as an extra parameter; they have no effect
|
/* These take a window as an extra parameter; they have no effect
|
||||||
|
Loading…
Reference in New Issue
Block a user