Xi: remove ungrab handling of ExtendedUngrabDevice request.
This can be done by UngrabDevice, no need for separate codepaths.
This commit is contained in:
parent
f14a62f823
commit
27b2127893
|
@ -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,
|
||||
|
|
12
dix/events.c
12
dix/events.c
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue
Block a user