(1886) XI: directly write out X_GetDeviceFocus reply
Write out X_GetDeviceFocus the 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
ad8333683f
commit
690dcd25e7
|
@ -421,9 +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_GetDeviceFocus)
|
||||
SRepXGetDeviceFocus(client, len, (xGetDeviceFocusReply *) rep);
|
||||
else if (rep->RepType == X_GetFeedbackControl)
|
||||
if (rep->RepType == X_GetFeedbackControl)
|
||||
SRepXGetFeedbackControl(client, len, (xGetFeedbackControlReply *) rep);
|
||||
else if (rep->RepType == X_GetDeviceKeyMapping)
|
||||
SRepXGetDeviceKeyMapping(client, len,
|
||||
|
|
|
@ -102,23 +102,13 @@ ProcXGetDeviceFocus(ClientPtr client)
|
|||
|
||||
rep.time = focus->time.milliseconds;
|
||||
rep.revertTo = focus->revert;
|
||||
WriteReplyToClient(client, sizeof(xGetDeviceFocusReply), &rep);
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.focus);
|
||||
swapl(&rep.time);
|
||||
}
|
||||
WriteToClient(client, sizeof(xGetDeviceFocusReply), &rep);
|
||||
return Success;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure writes the reply for the GetDeviceFocus function,
|
||||
* if the client and server have a different byte ordering.
|
||||
*
|
||||
*/
|
||||
|
||||
void _X_COLD
|
||||
SRepXGetDeviceFocus(ClientPtr client, int size, xGetDeviceFocusReply * rep)
|
||||
{
|
||||
swaps(&rep->sequenceNumber);
|
||||
swapl(&rep->length);
|
||||
swapl(&rep->focus);
|
||||
swapl(&rep->time);
|
||||
WriteToClient(client, size, rep);
|
||||
}
|
||||
|
|
|
@ -33,9 +33,4 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
int ProcXGetDeviceFocus(ClientPtr /* client */
|
||||
);
|
||||
|
||||
void SRepXGetDeviceFocus(ClientPtr /* client */ ,
|
||||
int /* size */ ,
|
||||
xGetDeviceFocusReply * /* rep */
|
||||
);
|
||||
|
||||
#endif /* GETFOCUS_H */
|
||||
|
|
Loading…
Reference in New Issue