Blame SOURCES/0001-Threshold-applies-to-pen-tools-only.patch

44a568
From 139aa56e3bb6025826413335f0f7e29d768baeb4 Mon Sep 17 00:00:00 2001
44a568
From: Ping Cheng <pinglinux@gmail.com>
44a568
Date: Thu, 10 Oct 2013 16:11:47 -0700
44a568
Subject: [PATCH 1/3] Threshold applies to pen tools only
44a568
44a568
This patch also removes redundant device name in X_PROBED messages.
44a568
44a568
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
44a568
Signed-off-by: Ping Cheng <pingc@wacom.com>
44a568
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
44a568
---
44a568
 src/wcmCommon.c | 12 +++++-------
44a568
 1 file changed, 5 insertions(+), 7 deletions(-)
44a568
44a568
diff --git a/src/wcmCommon.c b/src/wcmCommon.c
44a568
index c81310f..df71842 100644
44a568
--- a/src/wcmCommon.c
44a568
+++ b/src/wcmCommon.c
44a568
@@ -1323,7 +1323,7 @@ int wcmInitTablet(InputInfoPtr pInfo, const char* id, float version)
44a568
 		return !Success;
44a568
 	
44a568
 	/* Default threshold value if not set */
44a568
-	if (common->wcmThreshold <= 0)
44a568
+	if (common->wcmThreshold <= 0 && IsPen(priv))
44a568
 	{
44a568
 		/* Threshold for counting pressure as a button */
44a568
 		common->wcmThreshold = DEFAULT_THRESHOLD;
44a568
@@ -1333,19 +1333,17 @@ int wcmInitTablet(InputInfoPtr pInfo, const char* id, float version)
44a568
 	}
44a568
 
44a568
 	/* output tablet state as probed */
44a568
-	if (TabletHasFeature(common, WCM_PEN))
44a568
-		xf86Msg(X_PROBED, "%s: Wacom %s tablet maxX=%d maxY=%d maxZ=%d "
44a568
+	if (IsPen(priv))
44a568
+		xf86Msg(X_PROBED, "%s: maxX=%d maxY=%d maxZ=%d "
44a568
 			"resX=%d resY=%d  tilt=%s\n",
44a568
 			pInfo->name,
44a568
-			model->name,
44a568
 			common->wcmMaxX, common->wcmMaxY, common->wcmMaxZ,
44a568
 			common->wcmResolX, common->wcmResolY,
44a568
 			HANDLE_TILT(common) ? "enabled" : "disabled");
44a568
-	else
44a568
-		xf86Msg(X_PROBED, "%s: Wacom %s tablet maxX=%d maxY=%d maxZ=%d "
44a568
+	else if (IsTouch(priv))
44a568
+		xf86Msg(X_PROBED, "%s: maxX=%d maxY=%d maxZ=%d "
44a568
 			"resX=%d resY=%d \n",
44a568
 			pInfo->name,
44a568
-			model->name,
44a568
 			common->wcmMaxTouchX, common->wcmMaxTouchY,
44a568
 			common->wcmMaxZ,
44a568
 			common->wcmTouchResolX, common->wcmTouchResolY);
44a568
-- 
44a568
1.8.3.1
44a568