Xi: add swapping hook for XIGetFocus reply.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
fe430d7d3b
commit
1b3859a49a
|
@ -525,6 +525,8 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep)
|
||||||
SRepXIGetProperty(client, len, (xXIGetPropertyReply *) rep);
|
SRepXIGetProperty(client, len, (xXIGetPropertyReply *) rep);
|
||||||
else if (rep->RepType == X_XIGetSelectedEvents)
|
else if (rep->RepType == X_XIGetSelectedEvents)
|
||||||
SRepXIGetSelectedEvents(client, len, (xXIGetSelectedEventsReply *) rep);
|
SRepXIGetSelectedEvents(client, len, (xXIGetSelectedEventsReply *) rep);
|
||||||
|
else if (rep->RepType == X_XIGetFocus)
|
||||||
|
SRepXIGetFocus(client, len, (xXIGetFocusReply *) rep);
|
||||||
else {
|
else {
|
||||||
FatalError("XINPUT confused sending swapped reply");
|
FatalError("XINPUT confused sending swapped reply");
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,3 +118,13 @@ ProcXIGetFocus(ClientPtr client)
|
||||||
WriteReplyToClient(client, sizeof(xXIGetFocusReply), &rep);
|
WriteReplyToClient(client, sizeof(xXIGetFocusReply), &rep);
|
||||||
return Success;
|
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 SProcXIGetFocus(ClientPtr client);
|
||||||
int ProcXIGetFocus(ClientPtr client);
|
int ProcXIGetFocus(ClientPtr client);
|
||||||
|
|
||||||
|
void SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply* rep);
|
||||||
#endif /* XISETDEVFOCUS_H */
|
#endif /* XISETDEVFOCUS_H */
|
||||||
|
|
Loading…
Reference in New Issue