diff options
author | Chase Douglas <chase.douglas@canonical.com> | 2011-04-04 09:40:14 -0400 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-04-05 13:49:28 +1000 |
commit | 68a6a18fc2fe1d95c9196c1948a27f9e95029bec (patch) | |
tree | 9e554072d19a42c9ca69d6bbbd0f54d3587559d1 | |
parent | Ensure events are posted when entering into proximity (diff) | |
download | xf86-input-evdev-68a6a18fc2fe1d95c9196c1948a27f9e95029bec.tar.gz xf86-input-evdev-68a6a18fc2fe1d95c9196c1948a27f9e95029bec.tar.bz2 xf86-input-evdev-68a6a18fc2fe1d95c9196c1948a27f9e95029bec.zip |
Ensure all known valuator values are stored when out of proximity
The current code overwrites *all* the stored axis values with whatever
came in from evdev. Evdev is a stateful protocol, so it only sends us
updates to the axis values that have changed. We need to only update
the values that have changed.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/evdev.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c index 801e069..bad7bb8 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -504,7 +504,10 @@ EvdevProcessProximityState(InputInfoPtr pInfo) if (!pEvdev->prox_queued) { if (pEvdev->abs_queued && !pEvdev->in_proximity) - valuator_mask_copy(pEvdev->prox, pEvdev->vals); + for (i = 0; i < valuator_mask_size(pEvdev->vals); i++) + if (valuator_mask_isset(pEvdev->vals, i)) + valuator_mask_set(pEvdev->prox, i, + valuator_mask_get(pEvdev->vals, i)); return 0; } |