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

Window: Avoid processing input events if cancelDrawing=true #96

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Sk1er
Copy link
Member

@Sk1er Sk1er commented Oct 31, 2022

Otherwise, it is possible that a Window allows clicks or key types to trigger when it is invisible

Otherwise, it is possible that a Window allows clicks or key types to trigger when it is invisible
@Sk1er Sk1er requested a review from Johni0702 October 31, 2022 20:33
Copy link
Contributor

@Johni0702 Johni0702 left a comment

Choose a reason for hiding this comment

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

Not opposed in principle but not handling e.g. the mouse click events means that the OverlayManager will think that the screen did consume the event (because its final handler didn't get called) and therefore prevent it from reaching lower layers as well as the original screen, arguably worse than the current behavior.
So if we do do this, then we must also expose cancelDrawing (probably under a more descriptive name like hasErrored), so the overlay manager can skip and/or dispose of layers that are broken.

@CallumBugajski
Copy link
Contributor

Not opposed in principle but not handling e.g. the mouse click events means that the OverlayManager will think that the screen did consume the event (because its final handler didn't get called) and therefore prevent it from reaching lower layers as well as the original screen, arguably worse than the current behavior. So if we do do this, then we must also expose cancelDrawing (probably under a more descriptive name like hasErrored), so the overlay manager can skip and/or dispose of layers that are broken.

I've changed cancelDrawing to hasErrored and exposed it

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