summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2011-12-15 12:26:37 -0200
committerPeter Hutterer <peter.hutterer@who-t.net>2011-12-16 16:09:16 +1000
commit7909975b0b965fbf0935bf012987a5368ea0e67a (patch)
treeb059e3359707acaeed0f6ba9911932068eb50089
parent8d6dfd13b0c4177305555294218e366a6cddc83f (diff)
downloadxorg-driver-xf86-input-evdev-7909975b0b965fbf0935bf012987a5368ea0e67a.tar.gz
Fix relative events with swapped axes
After we swap the axes, we only call valuator_mask_set for axes that are not zero, so we need to unset the axes that became zero when swapped. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/evdev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c
index b1f9b2e..562c7e7 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -408,6 +408,10 @@ EvdevProcessValuators(InputInfoPtr pInfo)
tmp = pEvdev->delta[REL_X];
pEvdev->delta[REL_X] = pEvdev->delta[REL_Y];
pEvdev->delta[REL_Y] = tmp;
+ if (pEvdev->delta[REL_X] == 0)
+ valuator_mask_unset(pEvdev->vals, REL_X);
+ if (pEvdev->delta[REL_Y] == 0)
+ valuator_mask_unset(pEvdev->vals, REL_Y);
}
if (pEvdev->invert_x)
pEvdev->delta[REL_X] *= -1;