]> git.baikalelectronics.ru Git - kernel.git/commit
HID: wacom: generic: Leave tool in prox until it completely leaves sense
authorJason Gerecke <killertofu@gmail.com>
Fri, 8 Sep 2017 00:49:50 +0000 (17:49 -0700)
committerJiri Kosina <jkosina@suse.cz>
Wed, 13 Sep 2017 17:18:01 +0000 (19:18 +0200)
commitfd14f0437c26fdddd3658d8318f5799046fa43ab
tree0c6beec1c1a9fdc29549b537a90fa260dcdc99da
parent36c095abfbb908842bfaf7bb2d76761693a85582
HID: wacom: generic: Leave tool in prox until it completely leaves sense

The legacy Intuos codepath and tablet behavior (e.g. the 1st-gen Intuos
Pro, Cintiq 27, etc.) would result in a BTN_TOOL_* event not being cleared
to zero until the tool had completely left the sensing range of the
tablet. Before the final "out of prox" packet would be sent, zero or
more "in range" packets could be sent to indicate that a pen was still
detectable but not within a useful distance. These "in range" packets
were used by the driver to keep touch input disabled at greater pen
distances. In addition to keeping the `stylus_in_proximity` flag set,
the driver would leave the current BTN_TOOL_* marked as being in
proximity as well.

The new HID codepath also sets `stylus_in_proximity` based on the "sense"
flag, but does not leave the current BTN_TOOL_* marked as being in prox.
This information is potentially useful to for a future userspace-based
palm rejection, so this patch modifies the driver to continue sending it.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_wac.c