From 7242909e64651f9807109c8cf3f365042ea72104 Mon Sep 17 00:00:00 2001 From: Rick Calixte <10281587+rcalixte@users.noreply.github.com> Date: Sun, 31 Jul 2022 22:14:09 -0400 Subject: [PATCH] keybindings.c and prefs.h: Add separate keybindings for toggle window/workspace --- src/core/keybindings.c | 14 ++++++++++++++ src/meta/prefs.h | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/src/core/keybindings.c b/src/core/keybindings.c index 29f190b63..8ae2ff6c2 100644 --- a/src/core/keybindings.c +++ b/src/core/keybindings.c @@ -4871,6 +4871,20 @@ init_builtin_key_bindings (MetaDisplay *display) META_KEYBINDING_ACTION_MOVE_TO_CENTER, handle_move_to_center, 0); + add_builtin_keybinding (display, + "toggle-workspace-selection", + common_keybindings, + META_KEY_BINDING_NONE, + META_KEYBINDING_ACTION_TOGGLE_WORKSPACE_SELECTION, + NULL, 0); + + add_builtin_keybinding (display, + "toggle-window-selection", + common_keybindings, + META_KEY_BINDING_NONE, + META_KEYBINDING_ACTION_TOGGLE_WINDOW_SELECTION, + NULL, 0); + g_object_unref (common_keybindings); g_object_unref (mutter_keybindings); g_object_unref (mutter_wayland_keybindings); diff --git a/src/meta/prefs.h b/src/meta/prefs.h index 8996379f7..75906b3ca 100644 --- a/src/meta/prefs.h +++ b/src/meta/prefs.h @@ -378,6 +378,8 @@ gboolean meta_prefs_get_invert_flip_direction (void); * @META_KEYBINDING_ACTION_LOCATE_POINTER_KEY: FILLME * @META_KEYBINDING_ACTION_ALWAYS_ON_TOP: FILLME * @META_KEYBINDING_ACTION_LAST: FILLME + * @META_KEYBINDING_ACTION_TOGGLE_WORKSPACE_SELECTION: FILLME + * @META_KEYBINDING_ACTION_TOGGLE_WINDOW_SELECTION: FILLME */ /* XXX FIXME This should be x-macroed, but isn't yet because it would be * difficult (or perhaps impossible) to add the suffixes using the current @@ -480,6 +482,8 @@ typedef enum _MetaKeyBindingAction META_KEYBINDING_ACTION_ALWAYS_ON_TOP, META_KEYBINDING_ACTION_SWITCH_MONITOR, META_KEYBINDING_ACTION_ROTATE_MONITOR, + META_KEYBINDING_ACTION_TOGGLE_WORKSPACE_SELECTION, + META_KEYBINDING_ACTION_TOGGLE_WINDOW_SELECTION, META_KEYBINDING_ACTION_LAST } MetaKeyBindingAction;