diff --git a/Xi/extinit.c b/Xi/extinit.c index 19ad68bec..cf6d1950e 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -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_XIGrabDevice) - SRepXIGrabDevice(client, len, (xXIGrabDeviceReply *) rep); - else if (rep->RepType == X_XIPassiveGrabDevice) + if (rep->RepType == X_XIPassiveGrabDevice) SRepXIPassiveGrabDevice(client, len, (xXIPassiveGrabDeviceReply *) rep); else if (rep->RepType == X_XIListProperties) SRepXIListProperties(client, len, (xXIListPropertiesReply *) rep); diff --git a/Xi/xigrabdev.c b/Xi/xigrabdev.c index fca8b1f44..3494c41cc 100644 --- a/Xi/xigrabdev.c +++ b/Xi/xigrabdev.c @@ -126,11 +126,13 @@ ProcXIGrabDevice(ClientPtr client) .repType = X_Reply, .RepType = X_XIGrabDevice, .sequenceNumber = client->sequence, - .length = 0, .status = status }; - WriteReplyToClient(client, sizeof(rep), &rep); + if (client->swapped) { + swaps(&rep.sequenceNumber); + } + WriteToClient(client, sizeof(rep), &rep); return ret; } @@ -171,11 +173,3 @@ ProcXIUngrabDevice(ClientPtr client) return Success; } - -void _X_COLD -SRepXIGrabDevice(ClientPtr client, int size, xXIGrabDeviceReply * rep) -{ - swaps(&rep->sequenceNumber); - swapl(&rep->length); - WriteToClient(client, size, rep); -} diff --git a/Xi/xigrabdev.h b/Xi/xigrabdev.h index e5aa702c5..3deacffed 100644 --- a/Xi/xigrabdev.h +++ b/Xi/xigrabdev.h @@ -36,6 +36,4 @@ int SProcXIGrabDevice(ClientPtr client); int ProcXIUngrabDevice(ClientPtr client); int SProcXIUngrabDevice(ClientPtr client); -void SRepXIGrabDevice(ClientPtr client, int size, xXIGrabDeviceReply * rep); - #endif /* XIGRABDEV_H */