Adding support for a (multi-)touchscreen - where best to add it?

David Hagood david.hagood at gmail.com
Fri Mar 13 04:21:04 PDT 2009


On Fri, 2009-03-13 at 11:43 +1000, Peter Hutterer wrote:
> On Thu, Mar 12, 2009 at 01:40:29PM -0400, Chris Ball wrote:

> I agree. getting something sensible in the kernel prevents us from replicating
> the "one X driver per device" hilarity.
> Once we have that support in the kernel, we can look at how to get it to
> applications in a sensible manner. Real multi-touch is hard, and there are a
> few roadblocks that I'm not looking forward to.
> 
> Cheers,
>   Peter

OK, let me break it down into steps:

Step 1: add the code to the kernel HID system to
  1a) identify this device as being a special case within the HID system
  1b) send the device the needed special packet to tell it to start
sending data (otherwise it does nothing).
  1c) Parse the incoming data (it uses a specific format) into HID
events.

Alternatively 1a-1c could be done in a userspace library e.g. tslib.

Step 2: Add support at the X input layer to handle those packets, in one
of the several candidate drivers (e.g. input-tslib, input-evtouch,
input-evdev).
  As I understand it the consensus here is that this should be in evdev.
NOTE: currently the other touchscreens I have from 3M and Dannotech do
NOT work under evdev - when evdev is bound to them it doesn't generate
any events to X. They do work under tslib and evtouch.

Step 3: Hook into the multipointer support in X itself.
  As I understand it X should already support multiple pointers now.

Step 4: Hook into MP support in the toolkit (e.g. Qt) layers.
  As I understand it several of the toolkits support MP now.

Is that right?





More information about the xorg mailing list