diff --git a/dix/devices.c b/dix/devices.c index 3be0a1b4e..31f6b1590 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -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; } diff --git a/dix/swaprep.c b/dix/swaprep.c index a12c77126..71bf0cf69 100644 --- a/dix/swaprep.c +++ b/dix/swaprep.c @@ -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) { diff --git a/dix/tables.c b/dix/tables.c index 2ee5f5c19..e42a5e45a 100644 --- a/dix/tables.c +++ b/dix/tables.c @@ -821,7 +821,7 @@ ReplySwapPtr ReplySwapVector[256] = { ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, /* 105 */ - (ReplySwapPtr) SGetPointerControlReply, + ReplyNotSwappd, ReplyNotSwappd, (ReplySwapPtr) SGetScreenSaverReply, ReplyNotSwappd, diff --git a/include/swaprep.h b/include/swaprep.h index 692a80b91..7d4e8597f 100644 --- a/include/swaprep.h +++ b/include/swaprep.h @@ -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 */ );