[PATCH 2/2] XKB: Add debug key actions for grabs & window tree

Peter Hutterer peter.hutterer at who-t.net
Sun Jun 19 21:12:56 PDT 2011


On Fri, Jun 17, 2011 at 05:36:09PM +0100, Daniel Stone wrote:
> On Thu, Jun 16, 2011 at 11:01:58AM +1000, Peter Hutterer wrote:
> > > +        if (dev->deviceGrab.grab->deviceMask)
> > > +            DebugF("      xi1 event mask 0x%lx\n",
> > > +                   dev->deviceGrab.grab->deviceMask);
> > 
> > only for implicit passive grabs, otherwise eventMask is the device's grab
> > mask see the massive comment above struct _GrabRec in inputstr.h
> 
> I see.  I've just changed the conditional to
> if (devGrab->implicitGrab && grab->deviceMask) - does that suit?

I think it's better to check the grab type and then print out eventMask for
core, and eventMask/deviceMask depending on implicit. Otherwise you'd still
print out out "core mask: blah" for XI non-implicit grabs.

if (grab type == core)
    print event mask
else if (grab type == xi)
    print (implicit) ? device mask : event mask

Cheers,
  Peter


More information about the xorg-devel mailing list