diff --git a/Xi/extinit.c b/Xi/extinit.c index 4a95c7e2a..fe1a5778f 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -421,10 +421,7 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) { /* All we look at is the type field */ /* This is common to all replies */ - if (rep->RepType == X_GetDeviceKeyMapping) - SRepXGetDeviceKeyMapping(client, len, - (xGetDeviceKeyMappingReply *) rep); - else if (rep->RepType == X_GetDeviceModifierMapping) + if (rep->RepType == X_GetDeviceModifierMapping) SRepXGetDeviceModifierMapping(client, len, (xGetDeviceModifierMappingReply *) rep); else if (rep->RepType == X_SetDeviceModifierMapping) diff --git a/Xi/getkmap.c b/Xi/getkmap.c index b740450aa..5b47a1f5f 100644 --- a/Xi/getkmap.c +++ b/Xi/getkmap.c @@ -108,7 +108,12 @@ ProcXGetDeviceKeyMapping(ClientPtr client) .keySymsPerKeyCode = syms->mapWidth, .length = (syms->mapWidth * stuff->count) /* KeySyms are 4 bytes */ }; - WriteReplyToClient(client, sizeof(xGetDeviceKeyMappingReply), &rep); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + } + WriteToClient(client, sizeof(xGetDeviceKeyMappingReply), &rep); client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; WriteSwappedDataToClient(client, @@ -120,19 +125,3 @@ ProcXGetDeviceKeyMapping(ClientPtr client) return Success; } - -/*********************************************************************** - * - * This procedure writes the reply for the XGetDeviceKeyMapping function, - * if the client and server have a different byte ordering. - * - */ - -void _X_COLD -SRepXGetDeviceKeyMapping(ClientPtr client, int size, - xGetDeviceKeyMappingReply * rep) -{ - swaps(&rep->sequenceNumber); - swapl(&rep->length); - WriteToClient(client, size, rep); -} diff --git a/Xi/getkmap.h b/Xi/getkmap.h index f51e0e96d..74e2e5b78 100644 --- a/Xi/getkmap.h +++ b/Xi/getkmap.h @@ -33,9 +33,4 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. int ProcXGetDeviceKeyMapping(ClientPtr /* client */ ); -void SRepXGetDeviceKeyMapping(ClientPtr /* client */ , - int /* size */ , - xGetDeviceKeyMappingReply * /* rep */ - ); - #endif /* GETKMAP_H */