On Wed, Jun 22, 2011 at 07:18:14PM -0500, ch...@cnpbagwell.com wrote: > From: Chris Bagwell <ch...@cnpbagwell.com> > > This allows unknown touchscreens to work as expected (default to > absolute mode for example). We no longer need to update case > statement in wcmDeviceTypeKeys() each time a new ID is used with > new hardware. > > Signed-off-by: Chris Bagwell <ch...@cnpbagwell.com> > --- > > Recent example is new Levono tablet with ID of 0xE6 that required > an update to xf86-input-wacom to work. > > It also happens to let me use my new hid-multitouch touchscreen with > xf86-input-wacom. Probably, anything supported by hid-multitouch also > works. > > I debated with moving quirks logic to wcmDeviceTypeKeys() but I > suspect more ioctl()'s will be used in near future to detect > touchscreens and so decided to make easier change for now and > leave in wcmUSB. > > src/wcmUSB.c | 20 +++++++++++++++++--- > 1 files changed, 17 insertions(+), 3 deletions(-) > > diff --git a/src/wcmUSB.c b/src/wcmUSB.c > index 0ea7737..fe936d6 100644 > --- a/src/wcmUSB.c > +++ b/src/wcmUSB.c > @@ -1613,8 +1613,18 @@ static void usbDispatchEvents(InputInfoPtr pInfo) > wcmEvent(common, private->wcmBTNChannel, btn_ds); > } > > -/* Quirks to unify the tool types for GENERIC protocol tablet PCs */ > -static void usbGenericTouchscreenQuirks(unsigned long *keys, unsigned long > *abs) > +/* Quirks to unify the tool and tablet types for GENERIC protocol tablet PCs > + * > + * @param keys - Upon entering, contains keys queried from hardware. If a
no "-" needed here skip the "Upon entering", use @param[in,out] instead to signal that this parameter is modified. > + * touchscreen is detected, keys are modified to add BTN_TOOL_FINGER so > + * that a TOUCH device is created later. > + * @param abs - Used to detect multi-touch touchscreens. When detected, > + * updates keys to add possibly missing BTN_TOOL_DOUBLETAP. > + * @param tablet_type - When touchscreen is detected, addes WCM_TPC to s/addes/adds Reviewed-by: Peter Hutterer <peter.hutte...@who-t.net> otherwise Cheers, Peter > + * tablet_type so correct defaults, such as absolute mode, are used. > + */ > +static void usbGenericTouchscreenQuirks(unsigned long *keys, > + unsigned long *abs, int *tablet_type) > { > /* USB Tablet PC single finger touch devices do not emit > * BTN_TOOL_FINGER since it is a touchscreen device. > @@ -1622,7 +1632,10 @@ static void usbGenericTouchscreenQuirks(unsigned long > *keys, unsigned long *abs) > if (ISBITSET(keys, BTN_TOUCH) && > !ISBITSET(keys, BTN_TOOL_FINGER) && > !ISBITSET(keys, BTN_TOOL_PEN)) > + { > SETBIT(keys, BTN_TOOL_FINGER); /* 1FGT */ > + *tablet_type = WCM_TPC; > + } > > /* Serial Tablet PC two finger touch devices do not emit > * BTN_TOOL_DOUBLETAP since they are not touchpads. > @@ -1672,7 +1685,8 @@ static int usbProbeKeys(InputInfoPtr pInfo) > if (!ISBITSET(abs, ABS_MISC)) > { > common->wcmProtocolLevel = WCM_PROTOCOL_GENERIC; > - usbGenericTouchscreenQuirks(common->wcmKeys, abs); > + usbGenericTouchscreenQuirks(common->wcmKeys, abs, > + &common->tablet_type); > } > > common->vendor_id = wacom_id.vendor; > -- > 1.7.5.2 > > > ------------------------------------------------------------------------------ > Simplify data backup and recovery for your virtual environment with vRanger. > Installation's a snap, and flexible recovery options mean your data is safe, > secure and there when you need it. Data protection magic? > Nope - It's vRanger. Get your free trial download today. > http://p.sf.net/sfu/quest-sfdev2dev > _______________________________________________ > Linuxwacom-devel mailing list > Linuxwacom-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel > ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel