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>
master
Peter Hutterer 14 years ago
parent fed454192d
commit f3c628acc4
  1. 7
      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);
}
}

Loading…
Cancel
Save