XI: directly write out X_XIListProperties reply
Write out the X_XIListProperties reply directly (and do the swapping within the request handler) instead of going through separate callback that's having demux the replies again. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
957e04d2a3
commit
77cfdf5dbf
|
@ -421,9 +421,7 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep)
|
||||||
{
|
{
|
||||||
/* All we look at is the type field */
|
/* All we look at is the type field */
|
||||||
/* This is common to all replies */
|
/* This is common to all replies */
|
||||||
if (rep->RepType == X_XIListProperties)
|
if (rep->RepType == X_XIGetProperty)
|
||||||
SRepXIListProperties(client, len, (xXIListPropertiesReply *) rep);
|
|
||||||
else if (rep->RepType == X_XIGetProperty)
|
|
||||||
SRepXIGetProperty(client, len, (xXIGetPropertyReply *) rep);
|
SRepXIGetProperty(client, len, (xXIGetPropertyReply *) rep);
|
||||||
else if (rep->RepType == X_XIGetSelectedEvents)
|
else if (rep->RepType == X_XIGetSelectedEvents)
|
||||||
SRepXIGetSelectedEvents(client, len, (xXIGetSelectedEventsReply *) rep);
|
SRepXIGetSelectedEvents(client, len, (xXIGetSelectedEventsReply *) rep);
|
||||||
|
|
|
@ -1084,7 +1084,12 @@ ProcXIListProperties(ClientPtr client)
|
||||||
.num_properties = natoms
|
.num_properties = natoms
|
||||||
};
|
};
|
||||||
|
|
||||||
WriteReplyToClient(client, sizeof(xXIListPropertiesReply), &rep);
|
if (client->swapped) {
|
||||||
|
swaps(&rep.sequenceNumber);
|
||||||
|
swapl(&rep.length);
|
||||||
|
swaps(&rep.num_properties);
|
||||||
|
}
|
||||||
|
WriteToClient(client, sizeof(xXIListPropertiesReply), &rep);
|
||||||
if (natoms) {
|
if (natoms) {
|
||||||
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
|
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
|
||||||
WriteSwappedDataToClient(client, natoms * sizeof(Atom), atoms);
|
WriteSwappedDataToClient(client, natoms * sizeof(Atom), atoms);
|
||||||
|
@ -1270,16 +1275,6 @@ SProcXIGetProperty(ClientPtr client)
|
||||||
return (ProcXIGetProperty(client));
|
return (ProcXIGetProperty(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
void _X_COLD
|
|
||||||
SRepXIListProperties(ClientPtr client, int size, xXIListPropertiesReply * rep)
|
|
||||||
{
|
|
||||||
swaps(&rep->sequenceNumber);
|
|
||||||
swapl(&rep->length);
|
|
||||||
swaps(&rep->num_properties);
|
|
||||||
/* properties will be swapped later, see ProcXIListProperties */
|
|
||||||
WriteToClient(client, size, rep);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _X_COLD
|
void _X_COLD
|
||||||
SRepXIGetProperty(ClientPtr client, int size, xXIGetPropertyReply * rep)
|
SRepXIGetProperty(ClientPtr client, int size, xXIGetPropertyReply * rep)
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,8 +51,6 @@ int SProcXIChangeProperty(ClientPtr client);
|
||||||
int SProcXIDeleteProperty(ClientPtr client);
|
int SProcXIDeleteProperty(ClientPtr client);
|
||||||
int SProcXIGetProperty(ClientPtr client);
|
int SProcXIGetProperty(ClientPtr client);
|
||||||
|
|
||||||
void SRepXIListProperties(ClientPtr client, int size,
|
|
||||||
xXIListPropertiesReply * rep);
|
|
||||||
void SRepXIGetProperty(ClientPtr client, int size, xXIGetPropertyReply * rep);
|
void SRepXIGetProperty(ClientPtr client, int size, xXIGetPropertyReply * rep);
|
||||||
|
|
||||||
void XIResetProperties(void);
|
void XIResetProperties(void);
|
||||||
|
|
Loading…
Reference in New Issue