summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPing Cheng <pinglinux@gmail.com>2013-10-10 16:11:47 -0700
committerPeter Hutterer <peter.hutterer@who-t.net>2013-10-14 10:34:30 +1000
commit139aa56e3bb6025826413335f0f7e29d768baeb4 (patch)
tree96e7fc9cacd62c8882c08d1f81403ced479ef486
parent5395d18c4bbaa0d9ea96617ad41bd94848fb05e9 (diff)
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>
-rw-r--r--src/wcmCommon.c12
1 files 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);