Commit 486b908d authored by Ping Cheng's avatar Ping Cheng Committed by Jiri Kosina

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: default avatarPing Cheng <pingc@wacom.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent ef567cf9
...@@ -554,6 +554,9 @@ static int wacom_intuos_inout(struct wacom_wac *wacom) ...@@ -554,6 +554,9 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
if (features->quirks & WACOM_QUIRK_MULTI_INPUT) if (features->quirks & WACOM_QUIRK_MULTI_INPUT)
wacom->shared->stylus_in_proximity = true; wacom->shared->stylus_in_proximity = true;
if (wacom->shared->touch_down)
return 1;
/* in Range while exiting */ /* in Range while exiting */
if (((data[1] & 0xfe) == 0x20) && wacom->reporting_data) { if (((data[1] & 0xfe) == 0x20) && wacom->reporting_data) {
input_report_key(input, BTN_TOUCH, 0); input_report_key(input, BTN_TOUCH, 0);
...@@ -1759,6 +1762,9 @@ static int wacom_bpt_pen(struct wacom_wac *wacom) ...@@ -1759,6 +1762,9 @@ static int wacom_bpt_pen(struct wacom_wac *wacom)
return 0; return 0;
} }
if (wacom->shared->touch_down)
return 0;
prox = (data[1] & 0x20) == 0x20; prox = (data[1] & 0x20) == 0x20;
/* /*
......
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