diff --git a/xkb/xkb.c b/xkb/xkb.c index 29e8b4e425..d6838d408c 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -6198,15 +6198,22 @@ FillDeviceLedFBs(DeviceIntPtr dev, int class, int id, unsigned wantLength, int ProcXkbGetDeviceInfo(ClientPtr client) { + REQUEST(xkbGetDeviceInfoReq); + REQUEST_SIZE_MATCH(xkbGetDeviceInfoReq); + + if (client->swapped) { + swaps(&stuff->deviceSpec); + swaps(&stuff->wanted); + swaps(&stuff->ledClass); + swaps(&stuff->ledID); + } + DeviceIntPtr dev; int status; unsigned length, nameLen; CARD16 ledClass, ledID; unsigned wanted; - REQUEST(xkbGetDeviceInfoReq); - REQUEST_SIZE_MATCH(xkbGetDeviceInfoReq); - if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; diff --git a/xkb/xkbSwap.c b/xkb/xkbSwap.c index b6962ccab7..a79b1aff3e 100644 --- a/xkb/xkbSwap.c +++ b/xkb/xkbSwap.c @@ -363,18 +363,6 @@ SProcXkbGetKbdByName(ClientPtr client) return ProcXkbGetKbdByName(client); } -static int _X_COLD -SProcXkbGetDeviceInfo(ClientPtr client) -{ - REQUEST(xkbGetDeviceInfoReq); - REQUEST_SIZE_MATCH(xkbGetDeviceInfoReq); - swaps(&stuff->deviceSpec); - swaps(&stuff->wanted); - swaps(&stuff->ledClass); - swaps(&stuff->ledID); - return ProcXkbGetDeviceInfo(client); -} - static int _X_COLD SProcXkbSetDeviceInfo(ClientPtr client) { @@ -451,7 +439,7 @@ SProcXkbDispatch(ClientPtr client) case X_kbGetKbdByName: return SProcXkbGetKbdByName(client); case X_kbGetDeviceInfo: - return SProcXkbGetDeviceInfo(client); + return ProcXkbGetDeviceInfo(client); case X_kbSetDeviceInfo: return SProcXkbSetDeviceInfo(client); case X_kbSetDebuggingFlags: