[PATCH 0/4] Evdev multitouch events using slots protocol and mtdev

Chase Douglas chase.douglas at canonical.com
Wed Jun 23 07:04:36 PDT 2010


The following patch series implements multitouch events through evdev by
passing the touches as an array of valuators. The patches are based on
previous patches from Ben Tissoires, modified to work only on the MT
slots protocol. The last patch adds support for the mtdev library, which
translates the legacy protocol MT events to the MT slots protocol on the
fly. It is enabled by configuring with the "--with-mtdev" option.

The end result is a pointer device with an array of valuators for MT
touch events. The first "slot" in the array is labelled with the
appropriate atoms, and it is up to the application to understand that
subsequent slots are unlabelled but have the same MT event properties in
the same order. MT properties are always sequential and the last
properties in the valuators array.

A touch will always appear in the same "slot" in the valuators during
its life. This provides clients with tracked touches. Use the "Abs MT
Tracking ID" to determine whether the touch is valid. If the touch is
invalid (i.e. the touch was lifted), the ID will be -1. If the ID is not
-1, then it represents a touch that is down and the associated properties
are valid. Maybe we should rename the property to "Abs MT Valid" so we
don't encourage applications and toolkits to use the literal value for
tracking purposes?

Note that if mtdev is not used and the device does not emit events using
the MT slots protocol, evdev will ignore the MT events entirely.


More information about the xorg-devel mailing list