XKBMAlloc: use the correct first-key variable when extending a key range

When extending the range of changed virtual-modifier keys, one should
pass the two variables relevant to that range.

These two mistakes were found by grepping for 'modmap_key' and then
looking for asymmetries between the handling of the plain modmap thing
and the virtual modmap thing.  Inspired by issue #76.

(I suspect these mistakes were at the base of some intractable bugs
reported against xkeyboard-config where virtual modifiers refused
to work and had to be worked around by making other changes too.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
This commit is contained in:
Benno Schulenberg 2022-01-14 15:57:56 +01:00
parent f15d2a01f7
commit b9e0346abe

View file

@ -681,7 +681,7 @@ XkbChangeKeycodeRange(XkbDescPtr xkb,
if (changes) {
changes->map.changed = _ExtendRange(changes->map.changed,
XkbVirtualModMapMask, minKC,
&changes->map.first_modmap_key,
&changes->map.first_vmodmap_key,
&changes->map.num_vmodmap_keys);
}
}
@ -766,7 +766,7 @@ XkbChangeKeycodeRange(XkbDescPtr xkb,
if (changes) {
changes->map.changed = _ExtendRange(changes->map.changed,
XkbVirtualModMapMask, maxKC,
&changes->map.first_modmap_key,
&changes->map.first_vmodmap_key,
&changes->map.num_vmodmap_keys);
}
}