aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPing Cheng <pinglinux@gmail.com>2015-02-20 17:25:58 -0500
committerJiri Kosina <jkosina@suse.cz>2015-03-02 18:27:09 -0500
commit486b908d4412510d66ee348ba765de8d93441345 (patch)
treee48f8ab2bdd88dc3c02dcc7385b3e2c33a19e0ea
parentef567cf9ddb682dbfa840bf4a2600931299f9555 (diff)
HID: wacom: do not send pen events before touch is up/forced out
If pen comes in proximity while touch is down, we force touch up before sending pen events. Otherwise, there can be unfinished touch events compete with pen events. This idea has been fully implemented for Tablet PCs. But other tablets that support both pen and touch are not fully considered. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--drivers/hid/wacom_wac.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 046351cf17f3..69827c928e50 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -554,6 +554,9 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
554 if (features->quirks & WACOM_QUIRK_MULTI_INPUT) 554 if (features->quirks & WACOM_QUIRK_MULTI_INPUT)
555 wacom->shared->stylus_in_proximity = true; 555 wacom->shared->stylus_in_proximity = true;
556 556
557 if (wacom->shared->touch_down)
558 return 1;
559
557 /* in Range while exiting */ 560 /* in Range while exiting */
558 if (((data[1] & 0xfe) == 0x20) && wacom->reporting_data) { 561 if (((data[1] & 0xfe) == 0x20) && wacom->reporting_data) {
559 input_report_key(input, BTN_TOUCH, 0); 562 input_report_key(input, BTN_TOUCH, 0);
@@ -1759,6 +1762,9 @@ static int wacom_bpt_pen(struct wacom_wac *wacom)
1759 return 0; 1762 return 0;
1760 } 1763 }
1761 1764
1765 if (wacom->shared->touch_down)
1766 return 0;
1767
1762 prox = (data[1] & 0x20) == 0x20; 1768 prox = (data[1] & 0x20) == 0x20;
1763 1769
1764 /* 1770 /*