diff --git a/xkb/xkb.c b/xkb/xkb.c index 346a5a0a15..0c8ca1cf8c 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -3273,15 +3273,20 @@ _XkbSetIndicatorMap(ClientPtr client, DeviceIntPtr dev, int ProcXkbSetIndicatorMap(ClientPtr client) { + REQUEST(xkbSetIndicatorMapReq); + REQUEST_AT_LEAST_SIZE(xkbSetIndicatorMapReq); + + if (client->swapped) { + swaps(&stuff->deviceSpec); + swapl(&stuff->which); + } + int i, bit; int nIndicators; DeviceIntPtr dev; xkbIndicatorMapWireDesc *from; int rc; - REQUEST(xkbSetIndicatorMapReq); - REQUEST_AT_LEAST_SIZE(xkbSetIndicatorMapReq); - if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; diff --git a/xkb/xkbSwap.c b/xkb/xkbSwap.c index 4c69c3ad20..83469ed97c 100644 --- a/xkb/xkbSwap.c +++ b/xkb/xkbSwap.c @@ -129,16 +129,6 @@ SProcXkbSetCompatMap(ClientPtr client) return ProcXkbSetCompatMap(client); } -static int _X_COLD -SProcXkbSetIndicatorMap(ClientPtr client) -{ - REQUEST(xkbSetIndicatorMapReq); - REQUEST_AT_LEAST_SIZE(xkbSetIndicatorMapReq); - swaps(&stuff->deviceSpec); - swapl(&stuff->which); - return ProcXkbSetIndicatorMap(client); -} - static int _X_COLD SProcXkbGetKbdByName(ClientPtr client) { @@ -182,7 +172,7 @@ SProcXkbDispatch(ClientPtr client) case X_kbGetIndicatorMap: return ProcXkbGetIndicatorMap(client); case X_kbSetIndicatorMap: - return SProcXkbSetIndicatorMap(client); + return ProcXkbSetIndicatorMap(client); case X_kbGetNamedIndicator: return ProcXkbGetNamedIndicator(client); case X_kbSetNamedIndicator: