Xi: remove ungrab handling of ExtendedUngrabDevice request.

This can be done by UngrabDevice, no need for separate codepaths.
This commit is contained in:
Peter Hutterer 2008-02-25 17:00:42 +10:30
parent f14a62f823
commit 27b2127893
3 changed files with 2 additions and 30 deletions

View File

@ -107,19 +107,13 @@ ProcXExtendedGrabDevice(ClientPtr client)
REQUEST(xExtendedGrabDeviceReq);
REQUEST_AT_LEAST_SIZE(xExtendedGrabDeviceReq);
if (stuff->ungrab)
{
REQUEST_SIZE_MATCH(xExtendedGrabDeviceReq);
}
rep.repType = X_Reply;
rep.RepType = X_ExtendedGrabDevice;
rep.sequenceNumber = client->sequence;
rep.length = 0;
if (!stuff->ungrab && /* other fields are undefined for ungrab */
(stuff->length != (sizeof(xExtendedGrabDeviceReq) >> 2) +
stuff->event_count + 2 * stuff->generic_event_count))
if (stuff->length != (sizeof(xExtendedGrabDeviceReq) >> 2) +
stuff->event_count + 2 * stuff->generic_event_count)
{
errval = 0;
rc = BadLength;
@ -131,13 +125,6 @@ ProcXExtendedGrabDevice(ClientPtr client)
goto cleanup;
}
if (stuff->ungrab)
{
ExtUngrabDevice(client, dev);
goto cleanup;
}
rc = dixLookupWindow(&grab_window,
stuff->grab_window,
client,

View File

@ -6604,15 +6604,3 @@ ExtGrabDevice(ClientPtr client,
return GrabSuccess;
}
_X_EXPORT int
ExtUngrabDevice(ClientPtr client, DeviceIntPtr dev)
{
GrabInfoPtr grabinfo = &dev->deviceGrab;
if (grabinfo->grab && SameClient(grabinfo->grab, client))
(*grabinfo->DeactivateGrab)(dev);
return GrabSuccess;
}

View File

@ -698,7 +698,4 @@ extern int ExtGrabDevice(ClientPtr client,
CursorPtr cursor,
Mask xi_mask,
GenericMaskPtr ge_masks);
extern int ExtUngrabDevice(ClientPtr client,
DeviceIntPtr dev);
#endif /* DIX_H */