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