← Back to team overview

multi-touch-dev team mailing list archive

Re: Peter Hutterer's thoughts on MT in X

 

 On 10/12/2010 03:49 PM, ext Chase Douglas wrote:
On Mon, 2010-10-11 at 18:29 +0200, Henrik Rydberg wrote:
On 10/11/2010 04:22 PM, Chase Douglas wrote:
If I've read the rest of this thread correctly, it feels like Henrik is
advocating for splitting the gesture stack into a recognizer in X and an
instantiator on the client side. The issue I see here is that you still
need the context that only exists client side in order to perform
gesture recognition.

Take the case of what looks like a three finger pinch where two fingers
are over one object in a window and the third is over another object.
Imagine the two-fingered object is a scrollable region, and the
single-fingered object is a toolbar button above the scrollable region.
Now, you move the two fingers up to scroll. This looks like a three
finger pinch, but it's really a two finger drag. The recognizer would
have to enumerate all the possibilities of gestures depending on which
fingers are part of a possible gesture, and this becomes exponentially
difficult as the number of fingers increases. Thus, we can only perform
recognition after we know which fingers are part of a gesture, and we
can only do that with the knowledge available on the client side.

Nice example! To further complicate things, now imagine the three-finger pinch
is in fact a window-manager gesture that should zoom out to window selection,
like in unity. In order to route the gesture to the right place, knowledge of
the three-finger pinch would have to be available on the event-routing level,
which certainly seems simpler if the gesture primitives are known on the server
side.

For this particular example, since the regions are listening to different
gestures, there is actually knowledge available on the server side as well, so
the combinatorial explosion does not seem to enter here.
This is the real issue: the server does not actually know about these
regions. In old school toolkits, each widget was a separate X window.
Modern toolkits don't do this anymore; instead, they have one X window
for the overall "window" and they draw all the widgets themselves. The
server doesn't have any information about where any widgets are in
windows anymore.

Going along with this, event propagation for widgets in a "window" is
performed in the toolkit. When using modern toolkits, X event
propagation is only used to propagate events between application
"windows" on screen.

(Here I use quotes around "window" to refer to what a normal user would
call an application window, in contrast to the X definition of a
window.)
Totally agree with that! Server side recognition is a complete no-go for modern toolkits.
This leads us to the gesture recognition mechanism Peter and I have been
discussing. Since we can't perform gesture recognition in the server, we
have to potentially perform recognition twice: first at the system-wide
level, then potentially at the application level if no system-wide
gestures were recognized. One method for doing this is XI 2.1 passive
grabbing.
I don't understand why we hear that often about these different levels of gesture recognition.
Shouldn't all subscribers of input events be handled exactly the same way?
And consuming such input/gesture events should be solved by event propagation? Or do you want "system wide gestures" to have precedence over "application level gestures"? In case you want that kind of precedence, shouldn't just the window manager be the instance to decide if this is a "system wide gesture" or if the raw events should be propagated to the next client? - In that case i think it boils down to the same solution again. Am I missing something?

Zeno
-- Chase


_______________________________________________
Mailing list: https://launchpad.net/~multi-touch-dev
Post to     : multi-touch-dev@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~multi-touch-dev
More help   : https://help.launchpad.net/ListHelp




Follow ups

References