Commit 1b3859a4 authored by Peter Hutterer's avatar Peter Hutterer

Xi: add swapping hook for XIGetFocus reply.

Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent fe430d7d
......@@ -525,6 +525,8 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep)
SRepXIGetProperty(client, len, (xXIGetPropertyReply *) rep);
else if (rep->RepType == X_XIGetSelectedEvents)
SRepXIGetSelectedEvents(client, len, (xXIGetSelectedEventsReply *) rep);
else if (rep->RepType == X_XIGetFocus)
SRepXIGetFocus(client, len, (xXIGetFocusReply *) rep);
else {
FatalError("XINPUT confused sending swapped reply");
}
......
......@@ -118,3 +118,13 @@ ProcXIGetFocus(ClientPtr client)
WriteReplyToClient(client, sizeof(xXIGetFocusReply), &rep);
return Success;
}
void
SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply *rep)
{
char n;
swaps(&rep->sequenceNumber, n);
swapl(&rep->length, n);
swapl(&rep->focus, n);
WriteToClient(client, len, (char *)rep);
}
......@@ -32,4 +32,5 @@ int ProcXISetFocus(ClientPtr client);
int SProcXIGetFocus(ClientPtr client);
int ProcXIGetFocus(ClientPtr client);
void SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply* rep);
#endif /* XISETDEVFOCUS_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment