On 3/1/2010 3:41 PM, 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.
In a few words, Windows expects all the subsequent touch events to occur
on the same window as the first touch. If I press another window, the
corresponding WM_TOUCH notification is just skipped - not sent to the
client. I'm not sure about explicit mouse grab (SetCapture() call), though.
Gestures and touch events are mutually exclusive on Windows: one can
either receive WM_GESTURE or WM_TOUCH messages, but not the both. In the
latter case, I can feed the gestures engine manually, though, but again,
if I don't receive touch events for different windows, I can't make the
gestures engine recognize gestures for different windows.
In other words, Windows doesn't bother about user/gesture context at
all. If a client needs some complex manipulations (e.g. multiple users
interacting a large touch table), the native system doesn't provide any
help for that - just listen to the low-level touch events and write your
custom gestures recognizer.
Thanks,
Artem
(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
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. :)
Cheers,
Daniel
_______________________________________________
xorg-devel mailing list
xorg-devel@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-devel
_______________________________________________
xorg-devel mailing list
xorg-devel@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-devel