Skip to content

Commit 3142786

Browse files
committed
keybindings.c and prefs.h: Add separate key bindings for toggle window/workspace
1 parent 224ac93 commit 3142786

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

Diff for: src/core/keybindings.c

+14
Original file line numberDiff line numberDiff line change
@@ -4925,6 +4925,20 @@ init_builtin_key_bindings (MetaDisplay *display)
49254925
META_KEYBINDING_ACTION_MOVE_TO_CENTER,
49264926
handle_move_to_center, 0);
49274927

4928+
add_builtin_keybinding (display,
4929+
"toggle-workspace-selection",
4930+
common_keybindings,
4931+
META_KEY_BINDING_NONE,
4932+
META_KEYBINDING_ACTION_TOGGLE_WORKSPACE_SELECTION,
4933+
NULL, 0);
4934+
4935+
add_builtin_keybinding (display,
4936+
"toggle-window-selection",
4937+
common_keybindings,
4938+
META_KEY_BINDING_NONE,
4939+
META_KEYBINDING_ACTION_TOGGLE_WINDOW_SELECTION,
4940+
NULL, 0);
4941+
49284942
g_object_unref (common_keybindings);
49294943
g_object_unref (mutter_keybindings);
49304944
g_object_unref (mutter_wayland_keybindings);

Diff for: src/meta/prefs.h

+4
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,8 @@ gboolean meta_prefs_get_invert_flip_direction (void);
378378
* @META_KEYBINDING_ACTION_LOCATE_POINTER_KEY: FILLME
379379
* @META_KEYBINDING_ACTION_ALWAYS_ON_TOP: FILLME
380380
* @META_KEYBINDING_ACTION_LAST: FILLME
381+
* @META_KEYBINDING_ACTION_TOGGLE_WORKSPACE_SELECTION: FILLME
382+
* @META_KEYBINDING_ACTION_TOGGLE_WINDOW_SELECTION: FILLME
381383
*/
382384
/* XXX FIXME This should be x-macroed, but isn't yet because it would be
383385
* difficult (or perhaps impossible) to add the suffixes using the current
@@ -480,6 +482,8 @@ typedef enum _MetaKeyBindingAction
480482
META_KEYBINDING_ACTION_ALWAYS_ON_TOP,
481483
META_KEYBINDING_ACTION_SWITCH_MONITOR,
482484
META_KEYBINDING_ACTION_ROTATE_MONITOR,
485+
META_KEYBINDING_ACTION_TOGGLE_WORKSPACE_SELECTION,
486+
META_KEYBINDING_ACTION_TOGGLE_WINDOW_SELECTION,
483487

484488
META_KEYBINDING_ACTION_LAST
485489
} MetaKeyBindingAction;

0 commit comments

Comments
 (0)