diff --git a/Xi/extinit.c b/Xi/extinit.c index 296078f0d5..80aae7a391 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -422,10 +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_ListDeviceProperties) - SRepXListDeviceProperties(client, len, - (xListDevicePropertiesReply *) rep); - else if (rep->RepType == X_GetDeviceProperty) + if (rep->RepType == X_GetDeviceProperty) SRepXGetDeviceProperty(client, len, (xGetDevicePropertyReply *) rep); else if (rep->RepType == X_XIQueryPointer) SRepXIQueryPointer(client, len, (xXIQueryPointerReply *) rep); diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c index 305e1d0abb..b08b70cba4 100644 --- a/Xi/xiproperty.c +++ b/Xi/xiproperty.c @@ -874,7 +874,12 @@ ProcXListDeviceProperties(ClientPtr client) .nAtoms = natoms }; - WriteReplyToClient(client, sizeof(xListDevicePropertiesReply), &rep); + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.nAtoms); + } + WriteToClient(client, sizeof(xListDevicePropertiesReply), &rep); if (natoms) { client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, natoms * sizeof(Atom), atoms); @@ -1046,19 +1051,6 @@ SProcXGetDeviceProperty(ClientPtr client) return (ProcXGetDeviceProperty(client)); } -/* Reply swapping */ - -void _X_COLD -SRepXListDeviceProperties(ClientPtr client, int size, - xListDevicePropertiesReply * rep) -{ - swaps(&rep->sequenceNumber); - swapl(&rep->length); - swaps(&rep->nAtoms); - /* properties will be swapped later, see ProcXListDeviceProperties */ - WriteToClient(client, size, rep); -} - void _X_COLD SRepXGetDeviceProperty(ClientPtr client, int size, xGetDevicePropertyReply * rep) diff --git a/Xi/xiproperty.h b/Xi/xiproperty.h index 561779f2eb..58b9496780 100644 --- a/Xi/xiproperty.h +++ b/Xi/xiproperty.h @@ -41,8 +41,6 @@ int SProcXDeleteDeviceProperty(ClientPtr client); int SProcXGetDeviceProperty(ClientPtr client); /* reply swapping */ -void SRepXListDeviceProperties(ClientPtr client, int size, - xListDevicePropertiesReply * rep); void SRepXGetDeviceProperty(ClientPtr client, int size, xGetDevicePropertyReply * rep);