xserver: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Dec 3 00:44:54 UTC 2021
xkb/xkb.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
New commits:
commit be16bd8543f80ad2933ec9c37f082617c7084165
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Thu Dec 2 10:41:03 2021 +1000
xkb: fix XkbSetMap check for the keytypes count
The previous if/else condition resulted in us always setting the key
type count to the current number of key types. Split this up correctly.
Regression introduced in de940e06f8733d87bbb857aef85d830053442cfe
Fixes #1249
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 62dee9cb6..bfc21de00 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -2511,15 +2511,14 @@ _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req,
}
}
- if ((req->present & XkbKeyTypesMask) &&
- (!CheckKeyTypes(client, xkb, req, (xkbKeyTypeWireDesc **) &values,
- &nTypes, mapWidths, doswap))) {
- client->errorValue = nTypes;
- return BadValue;
- }
- else {
+ if (!(req->present & XkbKeyTypesMask)) {
nTypes = xkb->map->num_types;
}
+ else if (!CheckKeyTypes(client, xkb, req, (xkbKeyTypeWireDesc **) &values,
+ &nTypes, mapWidths, doswap)) {
+ client->errorValue = nTypes;
+ return BadValue;
+ }
/* symsPerKey/mapWidths must be filled regardless of client-side flags */
map = &xkb->map->key_sym_map[xkb->min_key_code];
More information about the xorg-commit
mailing list