Merge lp://staging/~ilidrissi.amine/gesturetest/621600-no-args into lp://staging/gesturetest

Proposed by Mohamed Amine Ilidrissi
Status: Rejected
Rejected by: Chase Douglas
Proposed branch: lp://staging/~ilidrissi.amine/gesturetest/621600-no-args
Merge into: lp://staging/gesturetest
Diff against target: 94 lines (+48/-36)
1 file modified
src/main.c (+48/-36)
To merge this branch: bzr merge lp://staging/~ilidrissi.amine/gesturetest/621600-no-args
Reviewer Review Type Date Requested Status
Chase Douglas (community) Approve
Henrik Rydberg (community) Approve
Review via email: mp+36641@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Henrik Rydberg (rydberg) wrote :

Looks ok to me.

review: Approve
Revision history for this message
Chase Douglas (chasedouglas) wrote :

I'm sorry I haven't gotten back to this sooner, but I'm against this change. gesturetest is not a demo program that you run to see things fly across your screen when you perform gestures :). It's a test tool that must be used in specific ways to get the results you want to see.

For example, if you are interested in testing rotation gestures, you should subscribe only to them and not to other gestures. As soon as you start to listen for other gestures things get very confusing. It can be hard to understand why you might be receiving drag gestures when you perform a pivot rotation, and subscribing to all gestures by default only exacerbates the issue. Essentially, I don't want people to run gesturetest and make decisions based on poor testing scenarios.

review: Disapprove
Revision history for this message
Mohamed Amine Ilidrissi (ilidrissi.amine) wrote :

So, for example, if a program listens to 2 different gestures at the same time (if it's waiting for the user to do something for example), those 2 gestures can collide, confusing the user? If so, shouldn't that be fixed?
(Just asking ; I don't know anything about gestures :p)

Revision history for this message
Chase Douglas (chasedouglas) wrote :

I'll give an example that caused us issues. If you want to perform a rotation where one finger pivots around another, you will receive both rotation and drag events. The reason is that gestures are performed about a point in space. Our gesture system uses the center (average) of all the touch points as this "focus" point. So if you perform a pivot rotation, you'll see the focus point being rotated, but you'll also see it being dragged. This is the correct behavior, but it isn't obvious.

We had a bug filed against our recognizer where the user didn't expect to see drag events when performing a pivot rotation. What they should have done is subscribed to just the rotate gesture events, since all they cared about was the rotation. I don't want to lead people to assume our stack is broken because they ran gesturetest without any arguments and saw behavior they didn't understand. Thus, I want to keep the functionality as is, potentially requiring the user to read the man page to understand what gesturetest is really doing.

Revision history for this message
Mohamed Amine Ilidrissi (ilidrissi.amine) wrote :

> I'll give an example that caused us issues. If you want to perform a rotation
> where one finger pivots around another, you will receive both rotation and
> drag events. The reason is that gestures are performed about a point in space.
> Our gesture system uses the center (average) of all the touch points as this
> "focus" point. So if you perform a pivot rotation, you'll see the focus point
> being rotated, but you'll also see it being dragged. This is the correct
> behavior, but it isn't obvious.
>
> We had a bug filed against our recognizer where the user didn't expect to see
> drag events when performing a pivot rotation. What they should have done is
> subscribed to just the rotate gesture events, since all they cared about was
> the rotation. I don't want to lead people to assume our stack is broken
> because they ran gesturetest without any arguments and saw behavior they
> didn't understand. Thus, I want to keep the functionality as is, potentially
> requiring the user to read the man page to understand what gesturetest is
> really doing.

Would an "--all-gestures" option do the trick? That way, the user knows that he is testing all the gestures at once.

Revision history for this message
Henrik Rydberg (rydberg) wrote :

I think the reasons for not including this change are really small. What you gain is the ability to see that *something* comes through in an easy way. For most people, that is that only thing they care about.

Regarding the completely different matter of rotation pivot, that bug is still valid, and the reasons for not confusing the center of the contacts with the pivot are still there. In the future, we will most likely see no drag events as one performs a rotation around a single finger, even if both types of events are listened to.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

I guess my underlying question is why we need this functionality. It seems to me that what we really need is a demo to show that gestures are working. Something graphical that you can manipulate. Gesturetest is not intended to show an end user that gestures are working properly. It is merely a developer's tool. This feels like trying to fit a round peg into a square hole.

Also, note that gesturetest will be dropped after Maverick anyways since gesture recognition will be performed client side instead of inside X. Geistest really is the utility you are after :).

Revision history for this message
Henrik Rydberg (rydberg) wrote :

Geistest is one layer further away from the source, and there are reasons to be able to test the presence of events on several checkpoints, this one included. And geistest would not be any easier to use with the same line of reasoning.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

I still disagree as I think this may lead to sloppy coding. For example, adding 0 as a window parameter to gesturetest to listen on all windows has already led to an improper implementation of gestures in Unity. Unity currently listens for window specific gestures on all windows, including root, and uses the focus point to choose the correct window for manipulation. This is plain wrong, and only occurred because the gesturetest code had a path for doing this (gesturetest code was basically copied and pasted into Unity). Thus far, 1/1 gesture projects have used gesturetest and subsequently been written improperly :).

That said, I'm apparently in the minority and this isn't a huge deal. I'll merge this change in when I have a chance.

review: Approve
Revision history for this message
Mohamed Amine Ilidrissi (ilidrissi.amine) wrote :

> I still disagree as I think this may lead to sloppy coding. For example,
> adding 0 as a window parameter to gesturetest to listen on all windows has
> already led to an improper implementation of gestures in Unity. Unity
> currently listens for window specific gestures on all windows, including root,
> and uses the focus point to choose the correct window for manipulation. This
> is plain wrong, and only occurred because the gesturetest code had a path for
> doing this (gesturetest code was basically copied and pasted into Unity). Thus
> far, 1/1 gesture projects have used gesturetest and subsequently been written
> improperly :).
>
> That said, I'm apparently in the minority and this isn't a huge deal. I'll
> merge this change in when I have a chance.

Your opinion still counts, though. You shouldn't approve this just because everyone else is okay with it. That said, thanks :)

Revision history for this message
Chase Douglas (chasedouglas) wrote :

Gesturetest is dead, so I'm rejecting this proposal.

Unmerged revisions

12. By Mohamed Amine Ilidrissi

Fixed the code.

11. By Rafi

Default args to 0 0 0xffffffffffffffff if no args are specified on the command
line. This should show all gestures that aren't caught by an application
(and fall through to the root window).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches