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 de940e06f8
Fixes #1249
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
6dd9709bd8
commit
be16bd8543
13
xkb/xkb.c
13
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];
|
||||
|
|
Loading…
Reference in New Issue