diff --git a/dix/events.c b/dix/events.c index 2030420e1..afe3e68c7 100644 --- a/dix/events.c +++ b/dix/events.c @@ -5280,7 +5280,6 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, int ProcGrabKeyboard(ClientPtr client) { - xGrabKeyboardReply rep; BYTE status; REQUEST(xGrabKeyboardReq); @@ -5301,13 +5300,18 @@ ProcGrabKeyboard(ClientPtr client) if (result != Success) return result; - rep = (xGrabKeyboardReply) { + xGrabKeyboardReply rep = { .type = X_Reply, .status = status, .sequenceNumber = client->sequence, .length = 0 }; - WriteReplyToClient(client, sizeof(xGrabKeyboardReply), &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 e899c111a..a32eed169 100644 --- a/dix/tables.c +++ b/dix/tables.c @@ -744,7 +744,7 @@ ReplySwapPtr ReplySwapVector[256] = { ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, /* 30 */ - (ReplySwapPtr) SGenericReply, /* SGrabKeyboardReply, */ + ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd,