ABS_MT_POSITION_X and Y counted more than once when multi-touching

Leslie Zhai xiangzhai83 at gmail.com
Fri Jul 26 19:54:10 PDT 2013


Hi xf86-input-evdev developers,

I use mtdev "read_mtdev.cpp" in test.tar.bz2 to get ABS_MT_POSITION_X
and ABS_MT_POSITION_Y sample "2s_zoom_in_sample.txt" in the same tarball
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.

Many thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20130727/2355d9ee/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tar.bz2
Type: application/x-bzip
Size: 114304 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20130727/2355d9ee/attachment-0001.bin>


More information about the xorg-devel mailing list