diff --git a/dix/events.c b/dix/events.c index 863dba332..688771645 100644 --- a/dix/events.c +++ b/dix/events.c @@ -5278,7 +5278,6 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, int ProcGrabKeyboard(ClientPtr client) { - xGrabKeyboardReply rep; BYTE status; REQUEST(xGrabKeyboardReq); @@ -5299,13 +5298,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 f2e087f04..0b5bc2abf 100644 --- a/dix/tables.c +++ b/dix/tables.c @@ -746,7 +746,7 @@ ReplySwapPtr ReplySwapVector[256] = { ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, /* 30 */ - (ReplySwapPtr) SGenericReply, /* SGrabKeyboardReply, */ + ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd,