diff --git a/Xi/exevents.c b/Xi/exevents.c index 9bd9d6078..d21490714 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -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) {