keybindings: Add support for resolving from multiple layouts

Add the infrastructure to resolve keybinding symbols from multiple
layouts. It is still unused, but will be, when the primary layout does
not have the required latin keysyms in it.

https://bugzilla.gnome.org/show_bug.cgi?id=787016
This commit is contained in:
Jonas Ådahl
2017-09-01 17:46:53 +08:00
parent 27d6c063ad
commit 8b060342bd
2 changed files with 112 additions and 35 deletions

View File

@ -89,6 +89,13 @@ typedef struct
gboolean builtin:1;
} MetaKeyPref;
typedef struct _MetaKeyBindingKeyboardLayout
{
struct xkb_keymap *keymap;
xkb_layout_index_t index;
xkb_level_index_t n_levels;
} MetaKeyBindingKeyboardLayout;
typedef struct
{
MetaBackend *backend;
@ -108,7 +115,11 @@ typedef struct
MetaResolvedKeyCombo iso_next_group_combo[2];
int n_iso_next_group_combos;
xkb_level_index_t keymap_num_levels;
/*
* A primary layout, and an optional secondary layout that is
* not yet used.
*/
MetaKeyBindingKeyboardLayout active_layouts[2];
/* Alt+click button grabs */
ClutterModifierType window_grab_modifiers;