Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GestureDetector: Make two_finger pans & swipes report the same sort of data than their standard brethren #10649

Merged
merged 15 commits into from
Jul 9, 2023

Conversation

NiLuJe
Copy link
Member

@NiLuJe NiLuJe commented Jul 5, 2023

In the process of looking over the "swipe reports the contact point (i.e., gesture start) as pos while pretty much everything else reports the lift point (i.e., gesture end)" for the QuickMenu anchoring thingy, I realized that the two-finger variants of the pans & swipes were doing things... differently (by always using the "swipe" semantics, which effectively means that two_finger_pan reports completely different things than pan).

So, I started looking into best to handle that, and I came up with an ugly mess.

Which leads me to a simple question: why? Wouldn't it be much, much simpler is swipes just behaved like everything else and reported the lift point as pos?

I don't think we actually care about it much... unless it's used for the tap/gesture zone hit detection, in which case it makes sense to use the start position, dammit (yes, I just thought about that right now :D).

Anyway, RFC, I haven't even started testing this anyway ;D.


This change is Reviewable

@NiLuJe NiLuJe changed the title GestureDetector: Swipe vs. Pan semantics RFC (FIXME to final) GestureDetector: Swipe vs. Pan semantics RFC (FIXME to final title) Jul 5, 2023
@NiLuJe
Copy link
Member Author

NiLuJe commented Jul 5, 2023

Hmm, tweaking the hit-detection is probably as simple a tweaking GestureRange's match function, but then I still need some nastiness to make sure only actual swipes have a start_pos set...

Sooo, it's probably still cleaner to leave the nastiness inside GestureDetector, and let everyhting else be happy in the fact that pos will always be what the gesture was triggered for, oblivious to the fact that it may not be the lift point...

@NiLuJe NiLuJe changed the title GestureDetector: Swipe vs. Pan semantics RFC (FIXME to final title) GestureDetector: Make two_finger pans & swipes report the same sort of data than their standard brethren Jul 5, 2023
@NiLuJe NiLuJe marked this pull request as ready for review July 5, 2023 18:39
@NiLuJe
Copy link
Member Author

NiLuJe commented Jul 5, 2023

Didn't fit in the title, but this also switches the QuickMenu anchor the the lift point for swipes, re: #10636 ;).

Copy link
Member Author

@NiLuJe NiLuJe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 2 files at r1, 1 of 1 files at r2, 2 of 2 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @NiLuJe)

@hius07
Copy link
Member

hius07 commented Jul 5, 2023

Can you please keep the dispatcher unchanged for a while, to avoid conflicts with #10646.

@NiLuJe
Copy link
Member Author

NiLuJe commented Jul 5, 2023

Oops, thought it was in an unmodified chunk ;).

@Frenzie Frenzie added this to the 2023.07 milestone Jul 5, 2023
Copy link
Member Author

@NiLuJe NiLuJe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @NiLuJe)

@hius07
Copy link
Member

hius07 commented Jul 7, 2023

Dispatcher is ready to get gesture end_pos when it appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants