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

Handle wayland touch cancel message #10950

Merged
merged 1 commit into from
Sep 26, 2024
Merged

Conversation

phcoder
Copy link

@phcoder phcoder commented Sep 26, 2024

Description

Suppose host has some three-finger gesture. Then we get the following sequence of events:
DOWN-DOWN-DOWN-MOTION-CANCEL

Note that there is no UP in this sequence. So if we don't handle CANCEL then we end up thinking that fingers are still touching the screen. Ideally we should inform the application that cancel has happened as not to trigger spurious taps but still this is way better than being stuck with phantom finger touch.

Suppose host has some three-finger gesture. Then we get the following sequence
of events:
DOWN-DOWN-DOWN-MOTION-CANCEL

Note that there is no UP in this sequence. So if we don't handle CANCEL then
we end up thinking that fingers are still touching the screen. Ideally we
should inform the application that cancel has happened as not to trigger
spurious taps but still this is way better than being stuck with phantom
finger touch.
Copy link
Contributor

@Kontrabant Kontrabant left a comment

Choose a reason for hiding this comment

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

Looks good to me. Raising all touch points is the same behavior that UIKit uses for the touch cancellation event, so it's consistent.

@Kontrabant Kontrabant merged commit 1edaad1 into libsdl-org:SDL2 Sep 26, 2024
40 checks passed
@sezero
Copy link
Contributor

sezero commented Sep 26, 2024

SDL3 ?

@Kontrabant
Copy link
Contributor

This will need an SDL3 version as well.

@Kontrabant
Copy link
Contributor

Done!

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