diff --git a/dix/events.c b/dix/events.c index c8fd77ec8..9a2ab0078 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4938,7 +4938,6 @@ int ProcGetInputFocus(ClientPtr client) { DeviceIntPtr kbd = PickKeyboard(client); - xGetInputFocusReply rep; FocusClassPtr focus = kbd->focus; int rc; @@ -4949,7 +4948,7 @@ ProcGetInputFocus(ClientPtr client) if (rc != Success) return rc; - rep = (xGetInputFocusReply) { + xGetInputFocusReply rep = { .type = X_Reply, .length = 0, .sequenceNumber = client->sequence, @@ -4963,7 +4962,11 @@ ProcGetInputFocus(ClientPtr client) else rep.focus = focus->win->drawable.id; - WriteReplyToClient(client, sizeof(xGetInputFocusReply), &rep); + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.focus); + } + WriteToClient(client, sizeof(rep), &rep); return Success; } diff --git a/dix/swaprep.c b/dix/swaprep.c index fc64a9312..f6bcb94e9 100644 --- a/dix/swaprep.c +++ b/dix/swaprep.c @@ -239,14 +239,6 @@ SwapTimeCoordWrite(ClientPtr pClient, int size, xTimecoord * pRep) } -void _X_COLD -SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply * pRep) -{ - swaps(&pRep->sequenceNumber); - swapl(&pRep->focus); - WriteToClient(pClient, size, pRep); -} - static void _X_COLD SwapCharInfo(xCharInfo * pInfo) { diff --git a/dix/tables.c b/dix/tables.c index 04125a4e0..efea4393a 100644 --- a/dix/tables.c +++ b/dix/tables.c @@ -755,7 +755,7 @@ ReplySwapPtr ReplySwapVector[256] = { ReplyNotSwappd, /* 40 */ ReplyNotSwappd, ReplyNotSwappd, - (ReplySwapPtr) SGetInputFocusReply, + ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, /* 45 */ ReplyNotSwappd, diff --git a/include/swaprep.h b/include/swaprep.h index 93cb01c60..452ca21a7 100644 --- a/include/swaprep.h +++ b/include/swaprep.h @@ -60,10 +60,6 @@ extern void SwapTimeCoordWrite(ClientPtr /* pClient */ , int /* size */ , xTimecoord * /* pRep */ ); -extern void SGetInputFocusReply(ClientPtr /* pClient */ , - int /* size */ , - xGetInputFocusReply * /* pRep */ ); - extern void SListExtensionsReply(ClientPtr /* pClient */ , int /* size */ , xListExtensionsReply * /* pRep */ );