diff --git a/Xi/extinit.c b/Xi/extinit.c index 5f9924db0..70de20021 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -421,9 +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_GrabDevice) - SRepXGrabDevice(client, len, (xGrabDeviceReply *) rep); - else if (rep->RepType == X_GetDeviceFocus) + if (rep->RepType == X_GetDeviceFocus) SRepXGetDeviceFocus(client, len, (xGetDeviceFocusReply *) rep); else if (rep->RepType == X_GetFeedbackControl) SRepXGetFeedbackControl(client, len, (xGetFeedbackControlReply *) rep); diff --git a/Xi/grabdev.c b/Xi/grabdev.c index 2c2a39c72..fe988832b 100644 --- a/Xi/grabdev.c +++ b/Xi/grabdev.c @@ -137,7 +137,11 @@ ProcXGrabDevice(ClientPtr client) if (rc != Success) return rc; - WriteReplyToClient(client, sizeof(xGrabDeviceReply), &rep); + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + } + WriteToClient(client, sizeof(xGrabDeviceReply), &rep); return Success; } @@ -195,18 +199,3 @@ CreateMaskFromList(ClientPtr client, XEventClass * list, int count, } return Success; } - -/*********************************************************************** - * - * This procedure writes the reply for the XGrabDevice function, - * if the client and server have a different byte ordering. - * - */ - -void _X_COLD -SRepXGrabDevice(ClientPtr client, int size, xGrabDeviceReply * rep) -{ - swaps(&rep->sequenceNumber); - swapl(&rep->length); - WriteToClient(client, size, rep); -} diff --git a/Xi/grabdev.h b/Xi/grabdev.h index 72e0fd692..8dfcab70d 100644 --- a/Xi/grabdev.h +++ b/Xi/grabdev.h @@ -44,9 +44,4 @@ int CreateMaskFromList(ClientPtr /* client */ , int /* req */ ); -void SRepXGrabDevice(ClientPtr /* client */ , - int /* size */ , - xGrabDeviceReply * /* rep */ - ); - #endif /* GRABDEV_H */