Xi: Fix passive XI2 ungrabs on XIAll[Master]Devices
The corresponding DeviceIntPtr wasn't being gotten properly, resulting in BadDevice from dixLookupDevice(). Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
24823f1ab0
commit
f52d5cd374
|
@ -261,9 +261,16 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
|
||||||
REQUEST(xXIPassiveUngrabDeviceReq);
|
REQUEST(xXIPassiveUngrabDeviceReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq);
|
REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq);
|
||||||
|
|
||||||
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess);
|
if (stuff->deviceid == XIAllDevices)
|
||||||
if (rc != Success)
|
dev = inputInfo.all_devices;
|
||||||
return rc;
|
else if (stuff->deviceid == XIAllMasterDevices)
|
||||||
|
dev = inputInfo.all_master_devices;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
if (stuff->grab_type != XIGrabtypeButton &&
|
if (stuff->grab_type != XIGrabtypeButton &&
|
||||||
stuff->grab_type != XIGrabtypeKeycode &&
|
stuff->grab_type != XIGrabtypeKeycode &&
|
||||||
|
|
Loading…
Reference in New Issue