From f3c628acc4f7399325756590cdc72e769341243c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 20 Dec 2011 10:56:22 +1000 Subject: Map ABS_MT_POSITION_X/Y into ABS_X/Y MT axes are the same as traditional axes, so one into the other so we get x/y coordinates regardless wich axes it comes from. Signed-off-by: Peter Hutterer --- src/evdev.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); } } -- cgit v1.2.3