On Tue, Jun 11, 2013 at 12:07:10AM +0200, Sjoerd Simons wrote:
> On Fri, 2013-05-31 at 16:44 +1000, Peter Hutterer wrote:
> > On Fri, May 24, 2013 at 10:47:32PM +0200, Sjoerd Simons wrote:
> > > Attached is an updated version of the patch which prevents
> > > false-positives by checking whether a touchscreen device uses the wacom
> > > kernel driver (by checking the ID_USB_DRIVER property from udev)
> > 
> > Please see my reply to Ritesh in this thread:
> > http://old.nabble.com/Re%3A-libwacom-not-recognizing-touch%28screen%29-devices-p35313125.html
> > 
> > we have a device database of the devices we support - might as well use it
> > :)
> 
> Read that now (didn't see it before, i suck at searching the SF mail
> archives it seems), not sure if it makes much sense to me...
> 
> libwacom_new_from_path seems to roughly speaking work in two steps:
>  1: Get raw device information
>  2: lookup device in the database, and if found (or if WFALLBACK_GENERIC
>     is given) create the WacomDevice struct.
> 
> What you seem to be suggesting is to fail getting the raw device
> information, in case the device is (practically speaking) a touchscreen
> that's not in the the database.. Which makes the semantics of
> WFALLBACK_GENERIC depend on the device type, which seems a bit odd.

not quite. what I'm suggesting is that if the device's vendor/product ID
matches one we already have in the DB we don't rely on the raw device
information anyway. e.g. if your DB says that 0x56a:00c6 is a Cintiq 12WX
we _know_ the device is a built-in tablet. that's what the db is for.

if a device is not in the database, then we need to guess and create the
generic device. in your case, the x220t should be in the database, it's the
0xe6 device so there is no reason we should fail.

where it's failing now is that if the device doesn't have the udev tags set
we don't look at it at all, even though the device may be in the db and thus
supported by libwacom.

> But if that's what you would like to see (Only do the WFALLBACK_GENERIC
> fallback for touchpads and non-integrated tablets), i'm happy to provide
> a patch that does that explicitly which seems nicer then having
> get_device_info pre-check the database :)
> 
> 
> Btw, checking whether the wacom driver is used instead of the database
> has the advantage something like g-s-d which uses WFALLBACK_GENERIC
> still works when one has a recent kernel which recognizes a new device
> but an older libwacom database.

true, but that would be on top of the other thing. also, we could assume
that anything with vendor id 056a is a wacom device which is probably better
than checking the kernel driver :)

Cheers,
   Peter


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to