mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-04-14 11:44:16 +00:00
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 <peter.hutterer@who-t.net>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user