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

Make KeyBindingContainer.Prioritised work for positional input too #5966

Merged
merged 4 commits into from
Aug 17, 2023

Conversation

bdach
Copy link
Collaborator

@bdach bdach commented Aug 16, 2023

RFC.

This change would allow to replace this game-side workaround with usage of KeyBindingContainer.IsPrioritised. The workaround in question is a blocker in resolving a game-side p0 issue (ppy/osu#24248 (comment)).

More specifically, this change ensures that the game-side workaround can be replaced with IsPrioritised without regressing issues like ppy/osu#6026. The fail case is when a child of the KeyBindingContainer is handling a plain input handler method like OnMouseDown(), and handles the positional input before the KeyBindingContainer even has a chance to see it. This is covered in the added test cases.

@bdach bdach changed the title Make KeyBindingContainer.IsPrioritised work for positional input too Make KeyBindingContainer.Prioritised work for positional input too Aug 16, 2023
@peppy
Copy link
Member

peppy commented Aug 16, 2023

I think this makes sense. The resultant code osu!-side also looks better (less-hacky) than what we have as a result (for reference: https://github.com/ppy/osu/compare/master...bdach:osu:remove-global-action-container-hack?expand=1).

@peppy peppy requested a review from smoogipoo August 16, 2023 09:16
@smoogipoo smoogipoo merged commit 55f4a81 into ppy:master Aug 17, 2023
10 of 12 checks passed
bdach added a commit to bdach/osu that referenced this pull request Aug 21, 2023
As described in ppy#24248, the workaround employed by
`GlobalActionContainer`, wherein it tried to handle actions with
priority before its children by being placed in front of the children
and not _actually containing_ said children, is blocking the resolution
of some rather major input handling issues that allow key releases to be
received by deparented drawables.

To resolve, migrate `GlobalActionContainer` to use `Prioritised`, which
can be done without regressing certain mouse button flows after
ppy/osu-framework#5966.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants