Enabling multitouch in input-evdev
Bradley T. Hughes
bradley.hughes at nokia.com
Tue Jan 12 01:42:03 PST 2010
On 01/08/2010 12:55 PM, ext Benjamin Tissoires wrote:
[snip]
> So, first question: is my behavior the good one? (not being compliant
> with Windows or MacOS)
>
> to begin the answer, I can tell the pros and cons of my way:
> Pros:
> * MPX related so anyone can simulate gestures with two mice...
> * More fun as we can easy have one cursor per touch (we can do that with
> the other solution but by sending Xtest events)
> * Easier to develop as I already made the patch ;-)
> Cons:
> * More complicated for the toolkits as they will have a different
> behavior between the different systems
I'm not sure how other toolkits will do it, but in Qt we have decided to
keep all the information in a single event (the same way that Windows 7, Mac
OS X, and the Linux kernel do it).
The main reason being:
> * More costly as the client part has to reassemble the parts to
> detect/treat gestures
... exactly this. If the evdev driver is going to split up the events, this
means that each client/toolkit will basically end up having to write the
same code to detect and track each touch point state. When trying to
implement something like a 2 finger pinch-zoom or rotate gesture, consider
the simplicity of simply calculating the angle between 2 points that are
delivered in a single event versus having to track 2 independent points
separately. If the driver doesn't ensure that the events are generated in an
ordered manner, this becomes even more difficult.
> The second problem was concerning trackpads:
>
> How can we handle modern-multitouch trackpads (Broadcom 5974,
> DiamondTouch). We excluded synaptics trackpads as they don't send ABS_MT
> events but special tools events (325, 330, 333, 334 for ToolFinger,
> Touch, Tool Doubletap, Tool Tripletap).
>
> From Stéphane's point of view, they should be transparent of my patched
> version of input-evdev as they are giving quite the same events than
> multitouch screens.
If they report the ABS_MT_* axes, then it should just work, yeh. It would be
interesting though to see how touchpads deliver the ABS_MT_POSITION_X/*Y points.
> Finally, I was wondering what is your position concerning the use of
> XI-properties to notify the client of the starting/ending of touch events.
You mean using properties to indicate when the first touch starts and the
last touch ends?
> I hope I did not bother you with all my questions but I think we could
> have an interesting discussion here.
Agreed :P
--
Bradley T. Hughes (Nokia-D-Qt/Oslo), bradley.hughes at nokia.com
Sandakervn. 116, P.O. Box 4332 Nydalen, 0402 Oslo, Norway
More information about the xorg-devel
mailing list