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

System-wide iPad gestures produce a click event on activation #6008

Open
frenzibyte opened this issue Sep 28, 2023 · 3 comments
Open

System-wide iPad gestures produce a click event on activation #6008

frenzibyte opened this issue Sep 28, 2023 · 3 comments

Comments

@frenzibyte
Copy link
Member

There is a gesture in my iPad allowing me to take screenshots by swiping from the bottom left corner. On osu!, that position of activating the gesture conflicts with the back button, resulting in the following:

trim.E94E67DC-4B18-41BB-94C9-DB286ABBE52D.MOV

It seems that whenever the OS acknowledges the gesture or proceeds with the screenshot, the "finger" is released and the game incorrectly handles that as a click rather than it being cancelled.

@BunnyTub
Copy link

This does do the exact same thing for me.

@Susko3
Copy link
Member

Susko3 commented Sep 30, 2023

Since SDL is used for input handling on iOS, and SDL_TouchFingerEvent doesn't seem to have a notion of canceling an event. This should be reported first to upstream, preferably with verbose SDL_HINT_EVENT_LOGGING enabled.

I know that Android has a similar notion of canceling motion events. And the same thing could apply to desktop: the window loosing focus when a mouse button is held (via alt-tab or another app coming to the foreground).

Not sure what's the best way to implement in o!f. On a high level, if a touch up input is cancelled, it shouldn't fire a ClickEvent. The touch/mouse up event should still fire so it doesn't get stuck in a down state.

@frenzibyte
Copy link
Member Author

A good start would be to implement a "Cancelled" state to button input events, which "MouseButtonEventManager" uses as an indicator to not fire a click event while still firing a mouse up event.

That would also replace an existing flag in that class that works similarly (used in hold-for-right-click logic).

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

No branches or pull requests

3 participants