Xi: allow passive keygrabs on the XIAll(Master)Devices fake devices

They don't have a KeyClassRec, but we must still allow passive grabs on
them.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Bastien Nocera <hadess@hadess.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit 22715e465b)
(cherry picked from commit 2f2d871ccd)
This commit is contained in:
Peter Hutterer 2011-10-27 11:03:39 +10:00 committed by Jeremy Huddleston
parent 0c4d7fca59
commit 6ded98becb

View file

@ -1483,7 +1483,7 @@ GrabKey(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device,
rc = CheckGrabValues(client, param);
if (rc != Success)
return rc;
if (k == NULL)
if ((dev->id != XIAllDevices && dev->id != XIAllMasterDevices) && k == NULL)
return BadMatch;
if (grabtype == GRABTYPE_XI)
{