diff --git a/Xi/extinit.c b/Xi/extinit.c index f62ce07c2..ad59a53cf 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_QueryDeviceState) - SRepXQueryDeviceState(client, len, (xQueryDeviceStateReply *) rep); - else if (rep->RepType == X_SetDeviceValuators) + if (rep->RepType == X_SetDeviceValuators) SRepXSetDeviceValuators(client, len, (xSetDeviceValuatorsReply *) rep); else if (rep->RepType == X_GetDeviceControl) SRepXGetDeviceControl(client, len, (xGetDeviceControlReply *) rep); diff --git a/Xi/queryst.c b/Xi/queryst.c index addc659c9..7bd405cda 100644 --- a/Xi/queryst.c +++ b/Xi/queryst.c @@ -150,24 +150,13 @@ ProcXQueryDeviceState(ClientPtr client) .length = bytes_to_int32(total_length), .num_classes = num_classes }; - WriteReplyToClient(client, sizeof(xQueryDeviceStateReply), &rep); - if (total_length > 0) - WriteToClient(client, total_length, savbuf); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + } + WriteToClient(client, sizeof(xQueryDeviceStateReply), &rep); + WriteToClient(client, total_length, savbuf); free(savbuf); return Success; } - -/*********************************************************************** - * - * This procedure writes the reply for the XQueryDeviceState function, - * if the client and server have a different byte ordering. - * - */ - -void _X_COLD -SRepXQueryDeviceState(ClientPtr client, int size, xQueryDeviceStateReply * rep) -{ - swaps(&rep->sequenceNumber); - swapl(&rep->length); - WriteToClient(client, size, rep); -} diff --git a/Xi/queryst.h b/Xi/queryst.h index a271edf71..32960b1cd 100644 --- a/Xi/queryst.h +++ b/Xi/queryst.h @@ -33,9 +33,4 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. int ProcXQueryDeviceState(ClientPtr /* client */ ); -void SRepXQueryDeviceState(ClientPtr /* client */ , - int /* size */ , - xQueryDeviceStateReply * /* rep */ - ); - #endif /* QUERYST_H */