diff --git a/Xi/extinit.c b/Xi/extinit.c index 3b6cb8c23..01c13c4d3 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -422,9 +422,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 d1d2da60f..9feb68654 100644 --- a/Xi/grabdev.c +++ b/Xi/grabdev.c @@ -138,7 +138,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; } @@ -196,18 +200,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 */