Xi: add swapping hook for XIGetFocus reply.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2009-08-21 12:29:39 +10:00
parent fe430d7d3b
commit 1b3859a49a
3 changed files with 13 additions and 0 deletions

View File

@ -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");
}

View File

@ -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);
}

View File

@ -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 */