Bradley T. Hughes at
Mon Mar 1 05:35:04 PST 2010

On 03/01/2010 01:41 PM, ext Daniel Stone wrote:
> On Mon, Mar 01, 2010 at 12:42:40PM +0100, Bradley T. Hughes wrote:
>> On 03/01/2010 12:22 PM, ext Daniel Stone wrote:
>>> 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).
> Any suggestions? :) Reference to how OS X and/or Windows implement it
> would be welcome too.

None at the moment... The current MD semantics mean that any events from a 
SD attached to an MD (even if we introduce sub-devices) means that the 
events will be routed to the window that has an implicit grab on the MD, 
right? So the extra fingers will always be routed to the first window that 
is pressed, unless I'm missing something... And, as mentioned before, this 
is what Windows 7 does (at least on my hardware) and *not* what we want in Xorg.

>>> (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)?
> You just extend the MD/SD semantics down, so if you have:
> MD ->  Touchscreen ->  Fingers [123...], then:
>     ->  Mouse
> then:
>    * grab on finger 1 results in only finger 1 being grabbed, fingers
>      2345 and the mouse are delivered as normal to any client
>    * grab on the ts results in all fingers being grabbed, but the mouse
>      being delivered as normal
>    * grab on the MD results in everything being grabbed
>    * grab on finger 1 by client A followed by a grab on the MD by client
>      B results in finger 1 being delivered to client A, and all other
>      fingers and the mouse being delivered to client B

Is this for explicit or implicit grabs? What if a client is only listening 
to events from the Master device (as advised by Peter in his blog series)?

> So, you just take the existing MD/SD semantics and extend them to n
> levels instead of 2.  Just walk up the list of parents looking for
> grabs/interest, stopping at the first one you find.
> Peter, correct me if I'm missing something blindingly obvious, or wholly
> non-obvious. :)

This is where my knowledge fails... so I'm also curious to what Peter thinks.

Bradley T. Hughes (Nokia-D-Qt/Oslo), at
Sandakervn. 116, P.O. Box 4332 Nydalen, 0402 Oslo, Norway

More information about the xorg-devel mailing list