xkbcomp/types: fix types being assigned the wrong number of levels in some circumstances
The buggy code assigned the number of levels based on the number of
level names in the definition, instead of the actual number of levels!
This would completely break type definitions which do not give names to
levels.
This was not noticed for so long because xkeyboard-config always gives
names to all levels.
This regressed in 61fed8dab9
.
Reported-by: Gatis Paeglis <gatis.paeglis@qt.io>
Signed-off-by: Ran Benita <ran234@gmail.com>
master
parent
18d6aebec0
commit
9f85d6b78c
|
@ -701,8 +701,9 @@ CopyKeyTypesToKeymap(struct xkb_keymap *keymap, KeyTypesInfo *info)
|
|||
|
||||
type->name = def->name;
|
||||
type->mods.mods = def->mods;
|
||||
type->num_levels = def->num_levels;
|
||||
darray_steal(def->level_names,
|
||||
&type->level_names, &type->num_levels);
|
||||
&type->level_names, NULL);
|
||||
darray_steal(def->entries,
|
||||
&type->entries, &type->num_entries);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue