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

Keep PassThroughInputManager in input queue even while parent input is disabled #6340

Merged
merged 2 commits into from
Jul 20, 2024

Conversation

frenzibyte
Copy link
Member

Attached a vital failing test case that deems this to be an incorrect approach (coming from ppy/osu#28931). When the PassThroughInputManager is hidden from the input queue, if there is a key pressed before parent input is enabled again, releasing the key after parent input is enabled does not trigger a KeyUpEvent on the PTIM, as demonstrated in the failing test case.

The purpose of hiding PTIM from the input queue in the first place is to prevent it from receiving a KeyDownEvent if parent input is enabled by another drawable that received the KeyDownEvent before the PTIM does (in osu! case, the PTIM is the gameplay input manager and the drawable is the osu! click-to-resume cursor; see OnPressed handling in the cursor).

To keep the osu!-side issue resolved (ppy/osu#9658), this will be fixed differently by locally scheduling the resume operation one frame after the KeyDownEvent, so that the ruleset input manager does not see the event and no press is triggered on resume.

@peppy peppy merged commit 891e4ff into ppy:master Jul 20, 2024
21 checks passed
@frenzibyte frenzibyte deleted the revert-some-ptim-changes branch July 20, 2024 05:42
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.

2 participants