From: Jason Gerecke <killert...@gmail.com> As a pen leaves, we need to be sure to reset all events back to zero so that userspace is able to get the complete pen state when it enters proximity again.
Signed-off-by: Jason Gerecke <jason.gere...@wacom.com> Reviewed-by: Ping Cheng <ping.ch...@wacom.com> Signed-off-by: Jiri Kosina <jkos...@suse.cz> [aaron.sko...@wacom.com: Imported into input-wacom repository (5b40104edfb0)] Signed-off-by: Aaron Armstrong Skomra <aaron.sko...@wacom.com> [aaron.sko...@wacom.com: Backported from input-wacom repository (80c2b9b562ee)] Signed-off-by: Aaron Armstrong Skomra <aaron.sko...@wacom.com> --- 3.17/wacom_wac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/3.17/wacom_wac.c b/3.17/wacom_wac.c index da95ea7097b6..944f74d44b8d 100644 --- a/3.17/wacom_wac.c +++ b/3.17/wacom_wac.c @@ -2227,10 +2227,10 @@ static void wacom_wac_pen_event(struct hid_device *hdev, struct hid_field *field return; /* send pen events only when the pen is in range */ - if (!wacom_wac->hid_data.inrange_state) - return; - - input_event(input, usage->type, usage->code, value); + if (wacom_wac->hid_data.inrange_state) + input_event(input, usage->type, usage->code, value); + else if (wacom_wac->shared->stylus_in_proximity && !wacom_wac->hid_data.sense_state) + input_event(input, usage->type, usage->code, 0); } static void wacom_wac_pen_pre_report(struct hid_device *hdev, -- 2.7.4 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel