Commit 71b5c476 authored by Jason Gerecke's avatar Jason Gerecke Committed by Jiri Kosina

HID: wacom: Simplify check for presence of single-finger touch

To determine if a touch is present in the single-touch case, we can
simply check if the BTN_TOUCH key is active or not. This will work for
both HID_GENERIC and other device types.
Signed-off-by: default avatarJason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent e48151a3
...@@ -1072,9 +1072,8 @@ static int wacom_wac_finger_count_touches(struct wacom_wac *wacom) ...@@ -1072,9 +1072,8 @@ static int wacom_wac_finger_count_touches(struct wacom_wac *wacom)
int count = 0; int count = 0;
int i; int i;
/* non-HID_GENERIC single touch input doesn't call this routine */ if (touch_max == 1)
if ((touch_max == 1) && (wacom->features.type == HID_GENERIC)) return test_bit(BTN_TOUCH, input->key) &&
return wacom->hid_data.tipswitch &&
!wacom->shared->stylus_in_proximity; !wacom->shared->stylus_in_proximity;
for (i = 0; i < input->mt->num_slots; i++) { for (i = 0; i < input->mt->num_slots; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment