XI: directly write out X_XIGrabDevice reply
Write out the X_XIGrabDevice 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
5bf2f662cc
commit
7c5482d568
|
@ -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_XIGrabDevice)
|
if (rep->RepType == X_XIPassiveGrabDevice)
|
||||||
SRepXIGrabDevice(client, len, (xXIGrabDeviceReply *) rep);
|
|
||||||
else if (rep->RepType == X_XIPassiveGrabDevice)
|
|
||||||
SRepXIPassiveGrabDevice(client, len, (xXIPassiveGrabDeviceReply *) rep);
|
SRepXIPassiveGrabDevice(client, len, (xXIPassiveGrabDeviceReply *) rep);
|
||||||
else if (rep->RepType == X_XIListProperties)
|
else if (rep->RepType == X_XIListProperties)
|
||||||
SRepXIListProperties(client, len, (xXIListPropertiesReply *) rep);
|
SRepXIListProperties(client, len, (xXIListPropertiesReply *) rep);
|
||||||
|
|
|
@ -126,11 +126,13 @@ ProcXIGrabDevice(ClientPtr client)
|
||||||
.repType = X_Reply,
|
.repType = X_Reply,
|
||||||
.RepType = X_XIGrabDevice,
|
.RepType = X_XIGrabDevice,
|
||||||
.sequenceNumber = client->sequence,
|
.sequenceNumber = client->sequence,
|
||||||
.length = 0,
|
|
||||||
.status = status
|
.status = status
|
||||||
};
|
};
|
||||||
|
|
||||||
WriteReplyToClient(client, sizeof(rep), &rep);
|
if (client->swapped) {
|
||||||
|
swaps(&rep.sequenceNumber);
|
||||||
|
}
|
||||||
|
WriteToClient(client, sizeof(rep), &rep);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,11 +173,3 @@ ProcXIUngrabDevice(ClientPtr client)
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _X_COLD
|
|
||||||
SRepXIGrabDevice(ClientPtr client, int size, xXIGrabDeviceReply * rep)
|
|
||||||
{
|
|
||||||
swaps(&rep->sequenceNumber);
|
|
||||||
swapl(&rep->length);
|
|
||||||
WriteToClient(client, size, rep);
|
|
||||||
}
|
|
||||||
|
|
|
@ -36,6 +36,4 @@ int SProcXIGrabDevice(ClientPtr client);
|
||||||
int ProcXIUngrabDevice(ClientPtr client);
|
int ProcXIUngrabDevice(ClientPtr client);
|
||||||
int SProcXIUngrabDevice(ClientPtr client);
|
int SProcXIUngrabDevice(ClientPtr client);
|
||||||
|
|
||||||
void SRepXIGrabDevice(ClientPtr client, int size, xXIGrabDeviceReply * rep);
|
|
||||||
|
|
||||||
#endif /* XIGRABDEV_H */
|
#endif /* XIGRABDEV_H */
|
||||||
|
|
Loading…
Reference in New Issue