summaryrefslogtreecommitdiff
path: root/src/wcmUSB.c
diff options
context:
space:
mode:
authorChris Bagwell <chris@cnpbagwell.com>2011-06-25 12:07:12 -0500
committerChris Bagwell <chris@cnpbagwell.com>2011-06-28 18:55:39 -0500
commit6c9c05e7dfadb6fc49f11a6541a18b1f84f8c844 (patch)
tree83b881f987aab38203c8519a25023933c78b2ded /src/wcmUSB.c
parented83c973802c4f3f34faa166ccfebbfdc5414e49 (diff)
downloadxf86-input-wacom-6c9c05e7dfadb6fc49f11a6541a18b1f84f8c844.tar.gz
Remove unused Capacity logic on touch devices
The feature never fully worked and bits have slowing been removed. Remove remaining in one swoop. As apart of removing logic, now store ABS_PRESSURE values in the more appropriate "pressure" location so that it can eventually be exposed in the Pressure axis that touch devices create but do not currently send. Additional changes beyond this patch are required to get Pressure Axis working on touch devices. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Diffstat (limited to 'src/wcmUSB.c')
-rw-r--r--src/wcmUSB.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/wcmUSB.c b/src/wcmUSB.c
index 30f7c07..4bb300d 100644
--- a/src/wcmUSB.c
+++ b/src/wcmUSB.c
@@ -1028,10 +1028,7 @@ static int usbParseAbsEvent(WacomCommonPtr common,
ds->tilty = event->value - common->wcmMaxtiltY/2;
break;
case ABS_PRESSURE:
- if (ds->device_type == TOUCH_ID)
- ds->capacity = event->value;
- else
- ds->pressure = event->value;
+ ds->pressure = event->value;
break;
case ABS_DISTANCE:
ds->distance = event->value;
@@ -1129,7 +1126,7 @@ static int usbParseAbsMTEvent(WacomCommonPtr common, struct input_event *event)
break;
case ABS_MT_PRESSURE:
- ds->capacity = event->value;
+ ds->pressure = event->value;
break;
default:
@@ -1253,17 +1250,8 @@ static int usbParseKeyEvent(WacomCommonPtr common,
if ((ds->proximity && !dslast->proximity) ||
(!ds->proximity && dslast->proximity))
ds->sample = (int)GetTimeInMillis();
- /* left button is always pressed for
- * touchscreen without capacity
- * when the first finger touch event received.
- * For touchscreen with capacity, left button
- * event will be decided
- * in wcmCommon.c by capacity threshold.
- * Touchpads should not have button
- * press.
- */
- if (common->wcmCapacityDefault < 0 &&
- (TabletHasFeature(common, WCM_LCD)))
+ /* left button is always pressed for touchscreen */
+ if (TabletHasFeature(common, WCM_LCD))
ds->buttons = mod_buttons(ds->buttons, 0, event->value);
break;