multitouch

Bradley T. Hughes bradley.hughes at nokia.com
Mon Mar 1 03:42:40 PST 2010


On 03/01/2010 12:22 PM, ext Daniel Stone wrote:
> Hi,
>
> On Mon, Mar 01, 2010 at 11:50:49AM +0100, Bradley T. Hughes wrote:
>> On 02/27/2010 02:25 PM, ext Matthew Ayres wrote:
>>> The impression I get from reading through this thread is that the
>>> simplest (and therefore possibly best) approach to grouping touch
>>> events is to group them according to which X window they intersect.
>>> That is, where a second touch event takes place in the same window as
>>> the first, it is part of the same master device; where it takes place
>>> elsewhere, it is another master device.  I'm not sure why this would
>>> not be a useful assumption.
>>
>> I like this idea (and this is similar what I did in Qt when trying to
>> determine context for a touch-point), the only concern is that Peter and
>> others have comment on how expensive it is to add/remove master devices.
>
> Not to mention the deeply unpleasant races -- unless you grab
> XGrabServer, which is prohibitively expensive and extremely anti-social.
>
> If you really need multiple devices, how hard is it to group events
> together when they come from separate devices? I'm guessing it can't be
> that hard: you'd be tracking _less state_, and it'd be _more
> predictable_.  How a hybrid system is easier for anyone is honestly
> beyond me, but hey.
>
> I still think a multi-level device hierachy would be helpful, thus
> giving us 'subdevice'-alike behaviour.  So if we were able to go:
[snip]
>
> and so on, and so forth ... would this be useful enough to let you take
> multi-device rather than some unpredictable hybrid?

It would for me, absolutely. This avoids the multi-device grab problem 
described by Peter earlier, but I'm unsure how well it works given that we 
still lack the user/gesture context (as described by Peter).

> (What happens in the hybrid system when I get an event from finger 1,
> decide I like it, take out a grab, and then finger 2 presses on another
> window.  Do I respect the event and give the app the finger 2 press it
> likely doesn't want, or break the grab and deliver it to another client?
> Neither answer is pleasant.)

But what happens in the sub-device system? Finger 1's event goes via it's MD 
to the client under the finger, but what about the second finger if it's 
over another client's window? Does it go to the client that got finger1 
since it's on the same MD (which precludes the multi-user use case)?

-- 
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