wcmLinkTouchAndPen only assigned touch to tablet (pen) interface.
New Intuos series requires another tool (pad in this case) on the
same interface as touch to access touch tool as well. That is, touch
tool should be assigned to wcmTouchDevice for its own common struct.

The use of IsTablet is necessary to guarantee we link pen and touch
tools.

Signed-off-by: Ping Cheng <pi...@wacom.com>
---
 src/wcmConfig.c | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/src/wcmConfig.c b/src/wcmConfig.c
index 2d19944..6891ca6 100644
--- a/src/wcmConfig.c
+++ b/src/wcmConfig.c
@@ -388,6 +388,11 @@ wcmInitModel(InputInfoPtr pInfo)
 /**
  * Link the touch tool to the pen of the same device
  * so we can arbitrate the events when posting them.
+ * As a by-product, we also assign the touch tool to
+ * its own common wcmTouchDevice so other tool on the
+ * same interface can access it, such as those devices
+ * that have expresskeys (pad) and touch on the same
+ * interface like Bamboo and new Intuos series.
  */
 static void wcmLinkTouchAndPen(InputInfoPtr pInfo)
 {
@@ -406,18 +411,24 @@ static void wcmLinkTouchAndPen(InputInfoPtr pInfo)
                        tmpcommon = tmppriv->common;
 
                        /* skip the same tool or already linked devices */
-                       if ((tmppriv == priv) || tmpcommon->wcmTouchDevice)
+                       if ((tmppriv == priv) ||
+                           (tmpcommon->wcmTouchDevice && IsTablet(tmppriv)))
                                continue;
 
                        if (tmpcommon->tablet_id == common->tablet_id)
                        {
-                               if (IsTouch(tmppriv) && IsTablet(priv))
+                               if (IsTouch(tmppriv))
+                               {
                                        common->wcmTouchDevice = tmppriv;
-                               else if (IsTouch(priv) && IsTablet(tmppriv))
+                                       tmpcommon->wcmTouchDevice = tmppriv;
+                               } else if (IsTouch(priv))
+                               {
                                        tmpcommon->wcmTouchDevice = priv;
+                                       common->wcmTouchDevice = priv;
+                               }
 
-                               if (common->wcmTouchDevice ||
-                                               tmpcommon->wcmTouchDevice)
+                               if ((common->wcmTouchDevice && IsTablet(priv)) 
||
+                                   (tmpcommon->wcmTouchDevice && 
IsTablet(tmppriv)))
                                {
                                        TabletSetFeature(common, WCM_PENTOUCH);
                                        TabletSetFeature(tmpcommon, 
WCM_PENTOUCH);
-- 
1.8.3.2


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to