Daniel Stone daniel at
Mon Mar 1 04:41:51 PST 2010

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.

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

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. :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <>

More information about the xorg-devel mailing list