So, we can not rely on pressure to set button 1 click for touch
screen devices.

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

Reply via email to