dix: write out X_GetPointerControl reply directly
No need for using a complex callback machinery, if we just move the little pieces of byte-swapping directly into the request handler. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
46abb82984
commit
39dcf3e233
|
@ -2420,7 +2420,6 @@ ProcGetPointerControl(ClientPtr client)
|
|||
{
|
||||
DeviceIntPtr ptr = PickPointer(client);
|
||||
PtrCtrl *ctrl;
|
||||
xGetPointerControlReply rep;
|
||||
int rc;
|
||||
|
||||
if (ptr->ptrfeed)
|
||||
|
@ -2434,7 +2433,7 @@ ProcGetPointerControl(ClientPtr client)
|
|||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
rep = (xGetPointerControlReply) {
|
||||
xGetPointerControlReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = 0,
|
||||
|
@ -2442,7 +2441,14 @@ ProcGetPointerControl(ClientPtr client)
|
|||
.accelDenominator = ctrl->den,
|
||||
.threshold = ctrl->threshold
|
||||
};
|
||||
WriteReplyToClient(client, sizeof(xGenericReply), &rep);
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swaps(&rep.accelNumerator);
|
||||
swaps(&rep.accelDenominator);
|
||||
swaps(&rep.threshold);
|
||||
}
|
||||
WriteToClient(client, sizeof(rep), &rep);
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
|
|
@ -535,17 +535,6 @@ SListExtensionsReply(ClientPtr pClient, int size, xListExtensionsReply * pRep)
|
|||
WriteToClient(pClient, size, pRep);
|
||||
}
|
||||
|
||||
void _X_COLD
|
||||
SGetPointerControlReply(ClientPtr pClient, int size,
|
||||
xGetPointerControlReply * pRep)
|
||||
{
|
||||
swaps(&pRep->sequenceNumber);
|
||||
swaps(&pRep->accelNumerator);
|
||||
swaps(&pRep->accelDenominator);
|
||||
swaps(&pRep->threshold);
|
||||
WriteToClient(pClient, size, pRep);
|
||||
}
|
||||
|
||||
void _X_COLD
|
||||
SGetScreenSaverReply(ClientPtr pClient, int size, xGetScreenSaverReply * pRep)
|
||||
{
|
||||
|
|
|
@ -821,7 +821,7 @@ ReplySwapPtr ReplySwapVector[256] = {
|
|||
ReplyNotSwappd,
|
||||
ReplyNotSwappd,
|
||||
ReplyNotSwappd, /* 105 */
|
||||
(ReplySwapPtr) SGetPointerControlReply,
|
||||
ReplyNotSwappd,
|
||||
ReplyNotSwappd,
|
||||
(ReplySwapPtr) SGetScreenSaverReply,
|
||||
ReplyNotSwappd,
|
||||
|
|
|
@ -154,11 +154,6 @@ extern void SListExtensionsReply(ClientPtr /* pClient */ ,
|
|||
int /* size */ ,
|
||||
xListExtensionsReply * /* pRep */ );
|
||||
|
||||
extern void SGetPointerControlReply(ClientPtr /* pClient */ ,
|
||||
int /* size */ ,
|
||||
xGetPointerControlReply *
|
||||
/* pRep */ );
|
||||
|
||||
extern void SGetScreenSaverReply(ClientPtr /* pClient */ ,
|
||||
int /* size */ ,
|
||||
xGetScreenSaverReply * /* pRep */ );
|
||||
|
|
Loading…
Reference in New Issue