- for (i = 0; i < XkbNumKbdGroups; i++) {
- if (from->numLevels[i] > 0) {
- if (into->numLevels[i] == 0) {
- into->numLevels[i] = from->numLevels[i];
- into->syms[i] = from->syms[i];
- into->symsMapIndex[i] = from->symsMapIndex[i];
- into->symsMapNumEntries[i] = from->symsMapNumEntries[i];
- into->acts[i] = from->acts[i];
- into->symsDefined |= (1 << i);
- darray_init(from->syms[i]);
- darray_init(from->symsMapIndex[i]);
- darray_init(from->symsMapNumEntries[i]);
- darray_init(from->acts[i]);
- from->numLevels[i] = 0;
- from->symsDefined &= ~(1 << i);
- if (!darray_empty(into->syms[i]))
- into->defined |= _Key_Syms;
- if (!darray_empty(into->acts[i]))
- into->defined |= _Key_Acts;
- }
- else {
- if (report) {
- if (!darray_empty(into->syms[i]))
- collide |= _Key_Syms;
- if (!darray_empty(into->acts[i]))
- collide |= _Key_Acts;
- }
- MergeKeyGroups(info, into, from, (unsigned) i);
- }
- }
- if (from->types[i] != XKB_ATOM_NONE) {
- if ((into->types[i] != XKB_ATOM_NONE) && report &&
- (into->types[i] != from->types[i])) {
- xkb_atom_t use, ignore;
- collide |= _Key_Types;
- if (from->merge != MERGE_AUGMENT) {
- use = from->types[i];
- ignore = into->types[i];
- }
- else {
- use = into->types[i];
- ignore = from->types[i];
- }
-
- log_warn(info->keymap->ctx,
- "Multiple definitions for group %d type of key %s; "
- "Using %s, ignoring %s\n",
- i, longText(into->name),
- xkb_atom_text(info->keymap->ctx, use),
- xkb_atom_text(info->keymap->ctx, ignore));
- }
-
- if (from->merge != MERGE_AUGMENT ||
- into->types[i] == XKB_ATOM_NONE) {
- into->types[i] = from->types[i];
- }
- }
- }