On Wed, Oct 19, 2011 at 7:01 PM, Ping Cheng <pingli...@gmail.com> wrote:
> So, we can not rely on pressure to set button 1 click for touch
> screen devices.

This code shouldn't be needed... or its a bug elsewhere if it is needed.

wcmSingleFingerPress() does the below logic but a little better in
that it tries not to do a button press during 2 finger gestures
(although it has a few known bugs).

My touchscreen is doing the left click correctly without looking at
pressure.  Maybe your seeing something related to pen proximity
masking that I didn't consider since my hw doesn't have pen support.

My touchscreen happens to be in the mail to have a dead zone fixed...
man, IRTL8191SU have bad luck with those things... so I can't really
test any ideas right now unless its on my Bamboo.

Chris

>
> Signed-off-by: Ping Cheng <pi...@wacom.com>
> ---
>  src/wcmCommon.c |   19 +++++++++++++++++--
>  1 files changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/src/wcmCommon.c b/src/wcmCommon.c
> index 08b3283..016e5e7 100644
> --- a/src/wcmCommon.c
> +++ b/src/wcmCommon.c
> @@ -938,8 +938,23 @@ void wcmEvent(WacomCommonPtr common, unsigned int 
> channel,
>        pChannel->valid.state = ds; /*save last raw sample */
>        if (pChannel->nSamples < common->wcmRawSample) ++pChannel->nSamples;
>
> -       if ((ds.device_type == TOUCH_ID) && common->wcmTouch)
> -               wcmGestureFilter(priv, channel);
> +       if (ds.device_type == TOUCH_ID)
> +       {
> +               /* single touch screen */
> +               if (TabletSetFeature(priv->common, WCM_1FGT) &&
> +                       TabletHasFeature(priv->common, WCM_LCD))
> +               {
> +                       if (ds.proximity)
> +                               pChannel->valid.state.buttons |= 1;
> +                       else
> +                               pChannel->valid.state.buttons &= ~1;
> +               }
> +               else
> +               {
> +                       if(common->wcmTouch)
> +                               wcmGestureFilter(priv, channel);
> +               }
> +       }
>
>        /* don't move the cursor if in gesture mode */
>        if (common->wcmGestureMode)
> --
> 1.7.6.4
>
>
> ------------------------------------------------------------------------------
> The demand for IT networking professionals continues to grow, and the
> demand for specialized networking skills is growing even more rapidly.
> Take a complimentary Learning@Ciosco Self-Assessment and learn
> about Cisco certifications, training, and career opportunities.
> http://p.sf.net/sfu/cisco-dev2dev
> _______________________________________________
> Linuxwacom-devel mailing list
> Linuxwacom-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
>

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Ciosco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to