Hi Oleksandr,Great, I was not actually convinced that ABS is really needed
On Fri, Jun 23, 2017 at 09:09:55AM +0300, Oleksandr Andrushchenko wrote:
+ switch (event->mtouch.event_type) {I was looking at this and realized that this breaks the single touch
+ case XENKBD_MT_EV_DOWN:
+ input_mt_report_slot_state(dev, MT_TOOL_FINGER,
+ true);
+ input_event(dev, EV_ABS, ABS_MT_POSITION_X,
+ event->mtouch.u.pos.abs_x);
+ input_event(dev, EV_ABS, ABS_MT_POSITION_Y,
+ event->mtouch.u.pos.abs_y);
+ input_event(dev, EV_ABS, ABS_X,
+ event->mtouch.u.pos.abs_x);
+ input_event(dev, EV_ABS, ABS_Y,
+ event->mtouch.u.pos.abs_y);
emulation for MT interface: for ST you are supposed to report the oldest
contact, here you report data for all of them. Luckily
input_mt_report_pointer_emulation() that is called as part of
input_mt_sync_frame() reports the correct ABS_X/ABS_Y data and fixes
that for you.
We should simply remove reporting ABS_X/ABS_Y here and in
XENKBD_MT_EV_MOTION as well.
+This is done automatically by input_mt_init_slots() when called with
+ input_set_capability(mtouch, EV_KEY, BTN_TOUCH);
+ input_set_abs_params(mtouch, ABS_X,
+ 0, width, 0, 0);
+ input_set_abs_params(mtouch, ABS_Y,
+ 0, height, 0, 0);
+ input_set_abs_params(mtouch, ABS_PRESSURE,
+ 0, 255, 0, 0);
INPUT_MT_DIRECT (as in your case) or INPUT_MT_POINTER, so this can be
removed as well.
Does the patch below (on top of yours) work for you?Unfortunately I didn't have time to test the patch today, but will try
Thanks.Thank you,