From 06f424afb7bdf6ee3d71bb9db895a1efa29b81e1 Mon Sep 17 00:00:00 2001 From: Stephen Chandler Paul Date: Mon, 16 Feb 2015 22:48:41 -0500 Subject: [PATCH] tablet: Make note of filtering out events while the tool is out of proximity 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 Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer --- src/evdev-tablet.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c index f99fd12c..6887307b 100644 --- a/src/evdev-tablet.c +++ b/src/evdev-tablet.c @@ -185,6 +185,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))