Elementa icon indicating copy to clipboard operation
Elementa copied to clipboard

Window: Avoid processing input events if cancelDrawing=true

Open Sk1er opened this issue 3 years ago • 1 comments

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

Sk1er avatar Oct 31 '22 20:10 Sk1er

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

CallumBugajski avatar Feb 02 '24 19:02 CallumBugajski