XI: directly write out X_XIGetFocus reply
Write out the X_XIGetFocus reply directly (and do the swapping within the request handler) instead of going through separate callback that's having demux the replies again. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
bd8e1dc6b8
commit
a4d8e1a231
|
@ -421,11 +421,7 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep)
|
|||
{
|
||||
/* All we look at is the type field */
|
||||
/* This is common to all replies */
|
||||
if (rep->RepType == X_XIGetFocus)
|
||||
SRepXIGetFocus(client, len, (xXIGetFocusReply *) rep);
|
||||
else {
|
||||
FatalError("XINPUT confused sending swapped reply");
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
|
|
|
@ -114,15 +114,11 @@ ProcXIGetFocus(ClientPtr client)
|
|||
else
|
||||
rep.focus = dev->focus->win->drawable.id;
|
||||
|
||||
WriteReplyToClient(client, sizeof(xXIGetFocusReply), &rep);
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.focus);
|
||||
}
|
||||
WriteToClient(client, sizeof(xXIGetFocusReply), &rep);
|
||||
return Success;
|
||||
}
|
||||
|
||||
void
|
||||
SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply * rep)
|
||||
{
|
||||
swaps(&rep->sequenceNumber);
|
||||
swapl(&rep->length);
|
||||
swapl(&rep->focus);
|
||||
WriteToClient(client, len, rep);
|
||||
}
|
||||
|
|
|
@ -36,5 +36,4 @@ int ProcXISetFocus(ClientPtr client);
|
|||
int SProcXIGetFocus(ClientPtr client);
|
||||
int ProcXIGetFocus(ClientPtr client);
|
||||
|
||||
void SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply * rep);
|
||||
#endif /* XISETDEVFOCUS_H */
|
||||
|
|
Loading…
Reference in New Issue