diff options
author | Ran Benita <ran234@gmail.com> | 2013-02-08 13:09:33 +0200 |
---|---|---|
committer | Ran Benita <ran234@gmail.com> | 2014-04-19 16:20:09 +0300 |
commit | ca3170ad3813389a3325513130c37e8038fa02f9 (patch) | |
tree | f743e6b3f056bcdcfab7f8b029a03c9818cb2dd7 /src/keymap-priv.c | |
parent | 3d7aff5fcdad501856662e6b84a76ef883b35784 (diff) | |
download | xorg-lib-libxkbcommon-ca3170ad3813389a3325513130c37e8038fa02f9.tar.gz |
Add struct xkb_mod_set
The only thing that the compilation phase needs the keymap for currently
is for access to the modifier information (it also modifies it in
place!). We want to only pass along the neccessary information, to make
it more tractable and testable, so instead of passing the entire keymap
we add a new 'mod_set' object and pass a (const) reference to that.
The new object is just the old array of 'struct xkb_mod'.
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/keymap-priv.c')
-rw-r--r-- | src/keymap-priv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/keymap-priv.c b/src/keymap-priv.c index 73d722f..83d8894 100644 --- a/src/keymap-priv.c +++ b/src/keymap-priv.c @@ -45,7 +45,8 @@ update_builtin_keymap_fields(struct xkb_keymap *keymap) * Add predefined (AKA real, core, X11) modifiers. * The order is important! */ - darray_append_items(keymap->mods, builtin_mods, ARRAY_SIZE(builtin_mods)); + darray_append_items(keymap->mods.mods, + builtin_mods, ARRAY_SIZE(builtin_mods)); } struct xkb_keymap * @@ -129,7 +130,7 @@ XkbModNameToIndex(const struct xkb_keymap *keymap, xkb_atom_t name, xkb_mod_index_t i; const struct xkb_mod *mod; - darray_enumerate(i, mod, keymap->mods) + darray_enumerate(i, mod, keymap->mods.mods) if ((mod->type & type) && name == mod->name) return i; |