[PATCH] xfree86: store the InputAttributes in the input device.

Peter Hutterer peter.hutterer at who-t.net
Tue May 25 14:23:33 PDT 2010


On Tue, May 25, 2010 at 08:34:29AM -0700, Dan Nicholson wrote:
> On Tue, May 25, 2010 at 12:15 AM, Peter Hutterer
> <peter.hutterer at who-t.net> wrote:
> > InputAttributes largely decide which configuration values get merged from
> > the xorg.conf.d snippets. While they are available in the config backend,
> > they are not available for any other callers of NewInputDeviceRequest().
> >
> > Drivers implementing driver-side hotplugging do not have access to these
> > attributes and cannot have xorg.conf.d snippets specific to dependent
> > devices. For example, the following case cannot work right now:
> >
> > Section "InputClass"
> >        MatchProduct "Wacom"
> >        Option "PressCurve" "0 0 100 100"
> >        ...
> > EndSection
> >
> > Section "InputClass"
> >        MatchProduct "Wacom"
> >        MatchProduct "eraser"
> >        Option "PressCurve" "10 10 50 50"
> >        ...
> > EndSection
> >
> > The second section is not triggered, as the wacom driver cannot supply the
> > InputAttributes to NewInputDeviceRequest().
> 
> The second section is also not entirely valid since there can only be
> one MatchProduct used per section. :) I don't know what the best way
> to differentiate the wacom multiple devices per device file case is.
> Maybe you could munge the product name to "Wacom Eraser" or something.

hmm, this is quite bad then. I just assumed it worked and when I tried the
above it must have worked only because I had just one device with "eraser"
in the name. 
scrapping the product name isn't really an option, it's complicated enough
as it is already (at least for wacom devices) and having the model
identifier in the name is quite useful.

I think there's a distinct need for supporting & on top of the current |,
it's quite hard to get generic matches for subdevices otherwise.

Cheers,
  Peter


More information about the xorg-devel mailing list