keymap: don't use XKB_NUM_GROUPS for key->kt_index
One unneeded XKB_NUM_GROUPS less. Signed-off-by: Ran Benita <ran234@gmail.com>master
parent
9a18b87251
commit
7a90f9e225
|
@ -99,6 +99,7 @@ xkb_keymap_unref(struct xkb_keymap *keymap)
|
||||||
free(key->num_syms);
|
free(key->num_syms);
|
||||||
free(key->syms);
|
free(key->syms);
|
||||||
free(key->actions);
|
free(key->actions);
|
||||||
|
free(key->kt_index);
|
||||||
}
|
}
|
||||||
darray_free(keymap->keys);
|
darray_free(keymap->keys);
|
||||||
darray_free(keymap->sym_interpret);
|
darray_free(keymap->sym_interpret);
|
||||||
|
|
|
@ -320,7 +320,7 @@ struct xkb_key {
|
||||||
|
|
||||||
union xkb_action *actions;
|
union xkb_action *actions;
|
||||||
|
|
||||||
unsigned kt_index[XKB_NUM_GROUPS];
|
unsigned *kt_index;
|
||||||
|
|
||||||
xkb_layout_index_t num_groups;
|
xkb_layout_index_t num_groups;
|
||||||
/* How many levels the largest group has. */
|
/* How many levels the largest group has. */
|
||||||
|
|
|
@ -1500,6 +1500,7 @@ out_of_loops:
|
||||||
* Find and assign the groups' types in the keymap. Also find the
|
* Find and assign the groups' types in the keymap. Also find the
|
||||||
* key width according to the largest type.
|
* key width according to the largest type.
|
||||||
*/
|
*/
|
||||||
|
key->kt_index = calloc(key->num_groups, sizeof(*key->kt_index));
|
||||||
key->width = 0;
|
key->width = 0;
|
||||||
darray_enumerate(i, groupi, keyi->groups) {
|
darray_enumerate(i, groupi, keyi->groups) {
|
||||||
struct xkb_key_type *type;
|
struct xkb_key_type *type;
|
||||||
|
|
Loading…
Reference in New Issue