ABS_MT_POSITION_X and Y counted more than once when multi-touching

Bug #1205361 reported by Leslie Zhai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mtdev (Ubuntu)
Fix Committed
Undecided
Unassigned

Bug Description

Hi mtdev developers,

I use mtdev "read_mtdev.cpp" in the test.tar.bz2 to get ABS_MT_POSITION_X and ABS_MT_POSITION_Y sample "2s_zoom_in_sample.txt" for each ABS_MT_SLOT when multi-touching.

But ABS_MT_POSITION_X and Y counted more than once for each slot "sample_plot.cpp", the plot chart shown as "2slots_zoom_in.png".

When ./sample_plot 2s_zoom_in_sample.txt 0
to only show slot[0] as "slot0_zoom_in.png", there are three blue lines, but instead should be only one.

When ./sample_plot 2s_zoom_in_sample.txt 1
to only show slot[1] as "slot1_zoom_in.png", there are also three red lines, but instead should be only one too.

My question is whether or not I process the ABS_MT_POSITION_X and Y for EV_ABS motion event type in "m_process_absolute_motion_event" uncorrectly?
I read the source code "xf86-input-evdev" http://cgit.freedesktop.org/xorg/driver/xf86-input-evdev/tree/src/evdev.c
It mentioned that

MT axes are counted twice - once as ABS_X (which the kernel keeps for
backwards compatibility), once as ABS_MT_POSITION_X. So we need to keep a
mapping of those axes to make sure we only count them once

It means I have to filter or remove some _X and _Y from the sample ? HOWTO : other issue;

You can use scons http://www.scons.org to build the test case.
"sample_slot.cpp" use Vtk http://www.vtk.org to render plot chart, you might need to install libvtk.

Revision history for this message
Leslie Zhai (xiangzhai83) wrote :
summary: - ABS_MT_POSITION_X and Y counted more than once multi-touching
+ ABS_MT_POSITION_X and Y counted more than once when multi-touching
Revision history for this message
Leslie Zhai (xiangzhai83) wrote :

Lenovo-IdeaPad-Yoga use protocol B
https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt

so when ABS_MT_SLOT new contact packets received, ABS_MT_POSITION_X/Y cache should be clear.

Changed in mtdev (Ubuntu):
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.