diff --git a/Xi/extinit.c b/Xi/extinit.c index 70de20021..9fa210c17 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_GetDeviceFocus) - SRepXGetDeviceFocus(client, len, (xGetDeviceFocusReply *) rep); - else if (rep->RepType == X_GetFeedbackControl) + if (rep->RepType == X_GetFeedbackControl) SRepXGetFeedbackControl(client, len, (xGetFeedbackControlReply *) rep); else if (rep->RepType == X_GetDeviceKeyMapping) SRepXGetDeviceKeyMapping(client, len, diff --git a/Xi/getfocus.c b/Xi/getfocus.c index e63239ff3..ebde12c09 100644 --- a/Xi/getfocus.c +++ b/Xi/getfocus.c @@ -102,23 +102,13 @@ ProcXGetDeviceFocus(ClientPtr client) rep.time = focus->time.milliseconds; rep.revertTo = focus->revert; - WriteReplyToClient(client, sizeof(xGetDeviceFocusReply), &rep); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.focus); + swapl(&rep.time); + } + WriteToClient(client, sizeof(xGetDeviceFocusReply), &rep); return Success; } - -/*********************************************************************** - * - * This procedure writes the reply for the GetDeviceFocus function, - * if the client and server have a different byte ordering. - * - */ - -void _X_COLD -SRepXGetDeviceFocus(ClientPtr client, int size, xGetDeviceFocusReply * rep) -{ - swaps(&rep->sequenceNumber); - swapl(&rep->length); - swapl(&rep->focus); - swapl(&rep->time); - WriteToClient(client, size, rep); -} diff --git a/Xi/getfocus.h b/Xi/getfocus.h index daaedfcbd..00650c17d 100644 --- a/Xi/getfocus.h +++ b/Xi/getfocus.h @@ -33,9 +33,4 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. int ProcXGetDeviceFocus(ClientPtr /* client */ ); -void SRepXGetDeviceFocus(ClientPtr /* client */ , - int /* size */ , - xGetDeviceFocusReply * /* rep */ - ); - #endif /* GETFOCUS_H */