aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-01-24 16:18:48 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-01-25 11:13:41 +1000
commit2b8b0df62ec554952784f2820fb4143c495232b0 (patch)
treec2b6c966963505555d59e8d2ac0de409f272d356 /src
parentMerge branch 'touch-axis-swap' (diff)
downloadxf86-input-evdev-2b8b0df62ec554952784f2820fb4143c495232b0.tar.gz
xf86-input-evdev-2b8b0df62ec554952784f2820fb4143c495232b0.tar.bz2
xf86-input-evdev-2b8b0df62ec554952784f2820fb4143c495232b0.zip
Always init axis mapping for the first two rel axes (#59784)
Fixes regression introduced in 2f67509b53b27dd7f51ca2aadd19605aee613a61. If evdev is used for touchpads, the abs axis movement is converted to a rel movement. Without the two relative axes initialized, the events are discarded. Axes 0 and 1 are always x/y anyway unless specifically configured otherwise. X.Org Bug 59784 <http://bugs.freedesktop.org/show_bug.cgi?id=59784> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r--src/evdev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 570dd06..731ebb3 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2576,6 +2576,9 @@ EvdevAlloc(void)
for (i = 0; i < ArrayLength(pEvdev->abs_axis_map); i++)
pEvdev->abs_axis_map[i] = -1;
+ pEvdev->rel_axis_map[0] = 0;
+ pEvdev->rel_axis_map[1] = 1;
+
return pEvdev;
}
@@ -2740,6 +2743,8 @@ static void EvdevInitAxesLabels(EvdevPtr pEvdev, int mode, int natoms, Atom *ato
memset(atoms, 0, natoms * sizeof(Atom));
+ /* rel[0] and [1] are always mapped, so we get the rel labels. if we
+ have abs x/y, the labels will be overwritten with the right one */
for (axis = 0; axis < ArrayLength(rel_labels); axis++)
EvdevInitOneAxisLabel(pEvdev, pEvdev->rel_axis_map[axis], rel_labels, axis, atoms);