From b9e0346abebb0c9e5c80c780bba4372419e63bde Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 14 Jan 2022 15:57:56 +0100 Subject: [PATCH] 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 --- src/xkb/XKBMAlloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xkb/XKBMAlloc.c b/src/xkb/XKBMAlloc.c index 61a7359e..8b3be303 100644 --- a/src/xkb/XKBMAlloc.c +++ b/src/xkb/XKBMAlloc.c @@ -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); } }