Enabling multitouch in input-evdev

Benjamin Tissoires tissoire at cena.fr
Tue Jan 19 02:12:32 PST 2010

Peter Hutterer wrote:
> On Tue, Jan 19, 2010 at 10:04:53AM +0100, Bradley T. Hughes wrote:
>> On 01/19/2010 09:43 AM, ext Peter Hutterer wrote:
>>>>> given the easy case of a single user interacting with a surface:
>>>>> with Qt as it is now, if you get all the coordinates in a single XI2 event,
>>>>> would that work for you? or is there extra information you need?
>>>> That should work. Ideally I would like to also get some kind of
>>>> indication from the device that it is a touch device, and what kind
>>>> of touch device it is (it is a touchscreen or a touchpad? for
>>>> example, we treat them slightly differently).
>>> Well, given the right axis labels that's the indication then :)
>> Can you give me an example? Right now, I'm struggling with finding
>> out how to get this information from the evdev driver to the client.
> as part of InitValuatorAxisStruct, the driver passes in an array of atoms
> specifying the labels for the axes it announced. these are defined in
> xserver-properties.h but are essentially free-form. so you can label them as
> e.g. "Touchpoint1 X", "Touchpoint1 Y" (this needs to be put in the driver,
> the current one doesn't do it).
> you can then have the client ask the driver for the axis labels and if one
> of the multi-touch axes is found, behave accordingly.
> there's no good way to label some device as "touchpad" and one shouldn't do
> so (the driver has to for technical reasons) since chances are likely that
> devices will turn up that are both touchpad and $OTHERDEVICE.
And how about using properties ? In the Evdev driver, we do know the 
capabilities of the device with the fields pEvdev->flags. If we export 
this flag, the toolkit will be able to know the kind of device 

About Bradley's question:

> I have a laptop with the N-Trig digitizer, which is supposed to be both a 
> touchscreen and a tablet. The device isn't working 100% in Linux yet, but it 
> should be possible to (eventually) detect events coming from the pen vs. 
> from a finger. But again, how would one pass this to the client?

Maybe we could copy the input-wacom driver: 2 devices, one for the pen, and one for the (multi)touch. I think in this case, it can be justified. But the point is that it will be more difficult to keep the driver generic... 



More information about the xorg-devel mailing list