aboutsummaryrefslogtreecommitdiff
path: root/src/evdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/evdev.c')
-rw-r--r--src/evdev.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 8adfefd..9a5608b 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -748,7 +748,12 @@ EvdevProcessTouchEvent(InputInfoPtr pInfo, struct input_event *ev)
else
pEvdev->slot_state = SLOTSTATE_CLOSE;
} else {
- map = pEvdev->axis_map[ev->code] - pEvdev->num_vals;
+ if (ev->code == ABS_MT_POSITION_X)
+ map = pEvdev->axis_map[ABS_X];
+ else if (ev->code == ABS_MT_POSITION_Y)
+ map = pEvdev->axis_map[ABS_Y];
+ else
+ map = pEvdev->axis_map[ev->code] - pEvdev->num_vals;
valuator_mask_set(pEvdev->mt_mask, map, ev->value);
}
}