mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-05 10:10:10 +01:00
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 <thatslyude@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
1751688cc8
commit
06f424afb7
1 changed files with 5 additions and 0 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue