Skip to content

Commit

Permalink
keybindings.c and prefs.h: Add separate key bindings for toggle windo…
Browse files Browse the repository at this point in the history
…w/workspace
  • Loading branch information
rcalixte committed Jan 7, 2023
1 parent 6f6f219 commit e075be9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/core/keybindings.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions src/meta/prefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e075be9

Please sign in to comment.