On 02/21/2012 09:15 PM, Bill Spitzak wrote: > Daniel Stone wrote: >> Hi, >> >> On 22 February 2012 00:13, Bill Spitzak <spit...@gmail.com> wrote: >>> It seems like it would be better if clients got the touch events first, and >>> the compositor only did things if the client said it was uninterested in the >>> events. For a lot of touch events this can be decided immediately on the >>> touch-down, since the client knows the user is pushing nothing. >> >> No, this just isn't true. You want global gestures (e.g. three finger >> swipe to change desktop) to take precedence over local shortcuts. And >> you cannot -- cannot -- know at touch-down time who's going to be >> ultimately interested in it. Because for a three-finger swipe, there >> will be a time when there's only one finger down, or two. At which >> point the client will say, 'ah yes, I'm interested in this!'. And >> then the third finger lands and you regret a terrible design decision >> you made. > > I would think the client could say "not interested" when it sees the > third finger.
The client won't see the third finger if it touches outside its window. In the wayland case, only the WM has all the info needed to determine if a touch is part of a global gesture. The WM needs to make the decision, not the client. > If the clients can look at things first, this would allow the compositor > to do things like "one finger can be used to change desktops if the > underlying program does not use it". That would be bad UI design because then global gestures would fire only sometimes. Further, it would break global gestures if touches occur over a broken application. > Solutions like "three fingers are needed" are just like the solutions > for shortcuts where you have to hold Alt and Ctrl and the right-hand > Shift and push the key, in an attempt to not collide with keystrokes the > program wants. Yes, system and application gestures may collide. There's not much one can do about it other than provide guidelines for application developers. Unity's guidelines are: three and four finger gestures are reserved for global uses. Everything else is fair game. I think we can look at other OSes as case studies. iOS and OS X employ effective global gestures imo, and they take precedence over the application receiving touch or gesture events. -- Chase _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel