Hi, Not sure if this posting is helpful, but you may just decide for yourselves :)
I happen to have patched a more or less complete MT event chain from the kernel-driver up to Qt 4.7.0 to work with XInput-based multitouch. The code "below" the Qt layer is meant to be rather low-level, meaning that it does not perform any gesture recognition at all, but leaves this task to the application layer that has the proper logic to do so (see the Qt patches for that). I think the topic of which layer should do the high-level recognition has been discussed extensively, so I do not want to add to that. The changes I made in the Xorg evdev driver mainly follow along the line that Stephane and his team already did (I even copied parts of their code). Because I had a special target device in mind that also runs "legacy" X applications (i.e. w/o multitouch support of any kind), I also cared about not breaking things with these apps, ending up in only sending button events for the primary finger on the screen as well as always sending the coordinates of the primary finger in the "non-MT" Abs fields. I also added a little convenience in the kernel's input.h which basically is a bitfield that keeps track of the fingers on the screen by setting the bits of the corresponding tracking IDs to 1 during touchdown. This is exported as just another button in the event device. As I avoided button events for all non-primary fingers, this bitfield makes it easy to keep track of "non-primary" touches and releases and also comes in handy when doing event compression (see the Qt patches for that). It turns out that multitouch-aware Qt applications work like a charm and even the legacy applications do (no jumping or locking "mouse-pointer" when (accidentally) hitting the screen with the second finger). Another useful thing when using the actual Xorg driver to relay the multitouch events (instead of directly working on /dev/input/eventXX from within the application layer) is the fact that software can very easily be tested on the actual multitouch device (in our case a slate) without even compiling on the device, just forward the X screen to the target device. With that you can do funny things like running the test application on your (fast-compiling) 64-bit workstation while having the output and the input on your 32-bit slate. Anyway, here is a URL to the patches as well as a small description: http://www.digitalmedics.de/projects/wetab Note that these patches currently only work for a certain (hid-egalax.c) device, as they were targeted at a special hardware platform. However, the code is written in a quite general way, so that adaptions to other hardware should be easy, in fact it suffices to work on the kernel HID layer. As the manufacturer of the slate device is already in the process of incorporating these patches into their system, I will take down the page in a couple of weeks. I felt that before I take it down, maybe those patches are of use to someone else, if not I apologize for wasting your time :) With best regards, Martin _______________________________________________ Mailing list: https://launchpad.net/~multi-touch-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~multi-touch-dev More help : https://help.launchpad.net/ListHelp

