Skip to content

Commit

Permalink
HID: wacom: do not send pen events before touch is up/forced out
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pinglinux authored and Jiri Kosina committed Mar 2, 2015
1 parent ef567cf commit 486b908
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/hid/wacom_wac.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,9 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
if (features->quirks & WACOM_QUIRK_MULTI_INPUT)
wacom->shared->stylus_in_proximity = true;

if (wacom->shared->touch_down)
return 1;

/* in Range while exiting */
if (((data[1] & 0xfe) == 0x20) && wacom->reporting_data) {
input_report_key(input, BTN_TOUCH, 0);
Expand Down Expand Up @@ -1759,6 +1762,9 @@ static int wacom_bpt_pen(struct wacom_wac *wacom)
return 0;
}

if (wacom->shared->touch_down)
return 0;

prox = (data[1] & 0x20) == 0x20;

/*
Expand Down

0 comments on commit 486b908

Please sign in to comment.