summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-05-28 16:00:02 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2018-05-29 10:00:05 +1000
commit456f23cbbd95eacc682284ffdede54f9a16d0c7d (patch)
tree630dcc1505819f938c773355103c38922cec0915
parentab1d9adfd34b351190bb10805c4e6b5a5aecd5de (diff)
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>
-rw-r--r--src/evdev.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 3d7b6f0..d07ee0a 100644
--- a/src/evdev.c
+++ b/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))
{