On Thu, Feb 3, 2011 at 11:12 PM, Ping Cheng <pingli...@gmail.com> wrote:
> Signed-off-by: Ping Cheng <pingli...@gmail.com>
> ---
>  src/wcmUSB.c |   17 ++++++++++++++++-
>  1 files changed, 16 insertions(+), 1 deletions(-)
>
> diff --git a/src/wcmUSB.c b/src/wcmUSB.c
> index 689378a..017e3a0 100644
> --- a/src/wcmUSB.c
> +++ b/src/wcmUSB.c
> @@ -1025,7 +1025,22 @@ static int usbParseKeyEvent(WacomCommonPtr common,
>                        break;
>
>                case BTN_TOUCH:
> -                       /* actual events are processed by BTN_TOOL_* events */
> +                       if (common->wcmProtocolLevel == WCM_PROTOCOL_GENERIC)
> +                       {
> +                               /* 1FG USB touchscreen */
> +                               if (!TabletHasFeature(common, WCM_PEN) &&
> +                                       TabletHasFeature(common, WCM_1FGT) &&
> +                                       TabletHasFeature(common, WCM_LCD))
> +                               {
> +                                       DBG(6, common,
> +                                           "USB 1FG Touch detected %x 
> (value=%d)\n",
> +                                       event->code, event->value);
> +                                       ds->device_type = TOUCH_ID;
> +                                       ds->device_id = TOUCH_DEVICE_ID;
> +                                       ds->proximity = event->value;
> +                                       MOD_BUTTONS(0, event->value);
> +                               }
> +                       }
>                        break;
>
>                case BTN_TOOL_FINGER:


It looks like a little fragile but I can't think of any other way to
handle combination of wacom_wac TPC and wacom_w8001 1FGT's way of
doing things (former not sending BTN_TOOL_FINGER and later sending
BTN_TOOL_FINGER).

Reviewed-by: Chris Bagwell <ch...@cnpbagwell.com>

------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to