On Sun, Nov 7, 2010 at 9:50 AM, Chris Bagwell <ch...@cnpbagwell.com> wrote:
> Please do not submit this 1 patch.  #2 is OK to submit still.
>
> I had forgot that tablet PC's/touchscreens only send BTN_TOUCH without
> a BTN_TOOL_FINGER.  So we should continue behaviour as treating
> BTN_TOUCH ~= BTN_TOOL_FINGER.

I see your point. But I don't feel we want to treat BTN_TOUCH ~=
BTN_TOOL_FINGER. That is a bit confusion in our context - pen can send
BTN_TOUCH too.

I would say we check for the existence of BTN_TOOL_DOUBLETAP. If it
does, the device is not PROTOCOL_GENERIC. Hence, TOOL_FINGER is
consider as PAD. As I mentioned before, we need to keep the
DOUBLETAP/TRIPLETAP and  TOOL_FINGER?PAD code as is since we have to
support backward compability (otherwise, I lose my job ;).

It is very ugly, I agree. But, we can not do much about it.

What do you think?

Ping

> I'll submit a new patch to update comments to make this clear.
>
> Chris
>
> On Thu, Nov 4, 2010 at 8:01 PM,  <ch...@cnpbagwell.com> wrote:
>> From: Chris Bagwell <ch...@cnpbagwell.com>
>>
>> Change logic from using BTN_TOUCH as indication of touchpad
>> tool events to instead use BTN_TOOL_FINGER.  Both ways work
>> for touchpads but basing it on tool indication is much more in
>> the tablet spirit.
>>
>> Signed-off-by: Chris Bagwell <ch...@cnpbagwell.com>
>> ---
>>  src/wcmUSB.c |   31 +++++++++++--------------------
>>  1 files changed, 11 insertions(+), 20 deletions(-)
>>
>> diff --git a/src/wcmUSB.c b/src/wcmUSB.c
>> index 186d660..a5cdc8b 100644
>> --- a/src/wcmUSB.c
>> +++ b/src/wcmUSB.c
>> @@ -915,31 +915,22 @@ static int usbParseKeyEvent(WacomCommonPtr common,
>>                        break;
>>
>>                case BTN_TOOL_FINGER:
>> -                       /* If a real finger report, ignore. */
>> -                       if (common->wcmProtocolLevel == WCM_PROTOCOL_GENERIC)
>> -                               break;
>> -
>> -                       DBG(6, common,
>> -                           "USB Pad detected %x (value=%d)\n",
>> -                           event->code, event->value);
>> -                       ds->device_type = PAD_ID;
>> -                       ds->device_id = PAD_DEVICE_ID;
>> -                       ds->proximity = (event->value != 0);
>> -                       break;
>> -
>> -               case BTN_TOUCH:
>> -                       /* Treat BTN_TOUCH same as BTN_TOOL_DOUBLETAP
>> -                        * for touchpads.
>> -                        * TODO: Tablets that do not use wacom style
>> -                        * multiplexing over a single input device
>> -                        * also can report BTN_TOUCH same as
>> -                        * BTN_TOOL_PEN would be used.  We should
>> -                        * allow for that case as well.
>> +                       /* Treat BTN_TOOL_FINGER same as BTN_TOOL_DOUBLETAP
>> +                        * for generic touchpads.
>>                         */
>>                        if (common->wcmProtocolLevel != WCM_PROTOCOL_GENERIC)
>> +                       {
>> +                               DBG(6, common,
>> +                                   "USB Pad detected %x (value=%d)\n",
>> +                                   event->code, event->value);
>> +                               ds->device_type = PAD_ID;
>> +                               ds->device_id = PAD_DEVICE_ID;
>> +                               ds->proximity = (event->value != 0);
>>                                break;
>> +                       }
>>
>>                        /* fall through */
>> +
>>                case BTN_TOOL_DOUBLETAP:
>>                        /* If a real double tap report, ignore. */
>>                        if (common->wcmProtocolLevel == WCM_PROTOCOL_GENERIC 
>> &&
>> --
>> 1.7.3.2
>>
>>
>
> ------------------------------------------------------------------------------
> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
> David G. Thomson, author of the best-selling book "Blueprint to a
> Billion" shares his insights and actions to help propel your
> business during the next growth cycle. Listen Now!
> http://p.sf.net/sfu/SAP-dev2dev
> _______________________________________________
> Linuxwacom-devel mailing list
> Linuxwacom-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
>

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to