mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-03-26 02:38:35 +00:00
Ignore x/y axis changes on proximity out
Wacom tablets send a farewell reset to 0 on all axes when the tool goes out of proximity. Ignore those so we can rely on our various valuator masks always having the correct coordinates. Possible false positive if you manage to go out of proximity right above the zero datum but meh. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
10
src/evdev.c
10
src/evdev.c
@@ -551,6 +551,16 @@ EvdevProcessProximityState(InputInfoPtr pInfo)
|
||||
}
|
||||
}
|
||||
|
||||
/* Wacom's last frame resets all values to 0, including x/y.
|
||||
Skip over this. */
|
||||
if (prox_state == 0) {
|
||||
int v;
|
||||
if (valuator_mask_fetch(pEvdev->abs_vals, 0, &v) && v == 0)
|
||||
valuator_mask_unset(pEvdev->abs_vals, 0);
|
||||
if (valuator_mask_fetch(pEvdev->abs_vals, 1, &v) && v == 0)
|
||||
valuator_mask_unset(pEvdev->abs_vals, 1);
|
||||
}
|
||||
|
||||
if ((prox_state && !pEvdev->in_proximity) ||
|
||||
(!prox_state && pEvdev->in_proximity))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user