mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-21 20:26:45 +00:00
input: add support for XIAllDevices and XIAllMasterDevices passive grabs.
These grabs are suported through two fake devices inputInfo.all_devices and inputInfo.all_master_devices. These devices are not part of the device list and are only initialised for their device id, nothing else. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
f00cf76751
commit
a66686a83e
5 changed files with 57 additions and 4 deletions
|
|
@ -90,9 +90,16 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
|||
REQUEST(xXIPassiveGrabDeviceReq);
|
||||
REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq);
|
||||
|
||||
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess);
|
||||
if (ret != Success)
|
||||
return ret;
|
||||
if (stuff->deviceid == XIAllDevices)
|
||||
dev = inputInfo.all_devices;
|
||||
else if (stuff->deviceid == XIAllMasterDevices)
|
||||
dev = inputInfo.all_master_devices;
|
||||
else
|
||||
{
|
||||
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess);
|
||||
if (ret != Success)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (stuff->grab_type != XIGrabtypeButton &&
|
||||
stuff->grab_type != XIGrabtypeKeysym &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue