[PATCH evdev 4/8] Move EVIOCGRAB into a static func.

Peter Hutterer peter.hutterer at who-t.net
Sun May 23 20:53:55 PDT 2010


On Sun, May 23, 2010 at 06:21:31PM -0700, Jamey Sharp wrote:
> On Sun, May 23, 2010 at 5:57 PM, Peter Hutterer
> <peter.hutterer at who-t.net> wrote:
> > This is in preparation of some major rework, there are no functional
> > changes.
> 
> It looks like you moved the initial grab/release pair from EvdevProbe
> to EvdevPreInit. I'm only looking at the patch, and I don't know this
> code at all, but is that really the same?

yeah, it is. EvdevProbe only has one caller - EvdevPreInit. The old code was
essentially:
    EvdevPreInit()
      ...
      EvdevProbe
          grab device

The new code moves the grabbing out of EvdevProbe and before it, which also
saves us a couple of other operations (initializing the button mapping and
caching the device info) when the device cannot be grabbed.

> Also, in the documentation comment for EvdevGrabDevice, "EVICGRAB" is mis-typed.

corrected. Thanks for the reviews.

Cheers,
  Peter


More information about the xorg-devel mailing list