There are many things going on in this field, from the recent merge of the xi2 branch into GTK+ master (yay!) to the ongoing effort in Xorg to support multitouch devices.
I’ve worked myself in a proposal to the evdev driver so it deals with multitouch devices as a set of XI2 devices (in GTK+ world, this means each finger would be represented by a GdkDevice), only one finger is able to send core events, while the others only get to send XI2 events, this seems pretty much in line with Peter’s thoughts on multitouch support
I also have a few patches in the xi2-playground branch that understand these semantics and basically make multitouch work out of the box.
So, if you have a multitouch device that’s understood by the linux kernel, these are the ingredients:
- Xorg 7.5 (Recent Fedora and Ubuntu have this)
- My evdev driver branch
- For N-Trig devices:
- hid-ntrig driver from Linus’ tree (seemingly included in Ubuntu Lucid)
- This xorg.conf.d file (a similar file might be needed on different hardware)
- GTK+ from the xi2-playground branch
Voilá! xinput list should tell something like:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ N-Trig MultiTouch id=12 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
∼ N-Trig MultiTouch touchpoint 0 id=13 [floating slave]
∼ N-Trig MultiTouch touchpoint 1 id=14 [floating slave]
∼ N-Trig MultiTouch touchpoint 2 id=15 [floating slave]
∼ N-Trig MultiTouch touchpoint 3 id=16 [floating slave]
And the GTK+ tests in tests/multidevice/ should just work, providing at the same time a single-touch device feeling to applications unaware of XI2 or multiple devices.
If you find this subject interesting, don’t miss my guadec talk! where I’ll be talking about multitouch in GTK+ and what applications can do to support it.