[PATCH libinput 3/8] tablet: Make note of filtering out events while the tool is out of proximity

Stephen Chandler Paul thatslyude at gmail.com
Mon Feb 16 19:48:41 PST 2015


This is in reference to an issue I discovered during the GSoC where I found that
there is a grey area with the tablet tool and the tablet itself, where the
tablet will pick up the presence of a tool, but won't get any useful information
from it. When this happens, tablets have a habit of sending distance events with
incorrect values in them. As such, it's a good idea not to forward any axis
events from evdev until we know that the tool is within usable proximity.

Signed-off-by: Stephen Chandler Paul <thatslyude at gmail.com>
---
 src/evdev-tablet.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index 6a1b60c..a87e2b7 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -184,6 +184,11 @@ tablet_check_notify_axes(struct tablet_dispatch *tablet,
 		axis_update_needed = true;
 	}
 
+	/* We need to make sure that we check that the tool is not out of
+	 * proximity before we send any axis updates. This is because many
+	 * tablets will send axis events with incorrect values if the tablet
+	 * tool is close enough so that the tablet can partially detect that
+	 * it's there, but can't properly receive any data from the tool. */
 	if (axis_update_needed &&
 	    !tablet_has_status(tablet, TABLET_TOOL_OUT_OF_PROXIMITY) &&
 	    !tablet_has_status(tablet, TABLET_TOOL_LEAVING_PROXIMITY))
-- 
1.9.5



More information about the wayland-devel mailing list