diff --git a/dix/events.c b/dix/events.c index 4e2cef660..2030420e1 100644 --- a/dix/events.c +++ b/dix/events.c @@ -5015,7 +5015,6 @@ ProcGetInputFocus(ClientPtr client) int ProcGrabPointer(ClientPtr client) { - xGrabPointerReply rep; DeviceIntPtr device = PickPointer(client); GrabPtr grab; GrabMask mask; @@ -5055,13 +5054,17 @@ ProcGrabPointer(ClientPtr client) if (rc != Success) return rc; - rep = (xGrabPointerReply) { + xGrabPointerReply rep = { .type = X_Reply, .status = status, .sequenceNumber = client->sequence, .length = 0 }; - WriteReplyToClient(client, sizeof(xGrabPointerReply), &rep); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + } + WriteToClient(client, sizeof(rep), &rep); return Success; } diff --git a/dix/tables.c b/dix/tables.c index 8c574bfd4..e899c111a 100644 --- a/dix/tables.c +++ b/dix/tables.c @@ -739,7 +739,7 @@ ReplySwapPtr ReplySwapVector[256] = { ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, /* 25 */ - (ReplySwapPtr) SGenericReply, /* SGrabPointerReply, */ + ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd,