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

Ignore scaling transforms when resizing a orphan AWTGLCanvas. #65

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dolda2000
Copy link

@dolda2000 dolda2000 commented May 2, 2023

Before the canvas has been added to a parent, its GraphicsConfiguration is null, causing the resize event from eg. a setSize to throw an exception on stderr from the AWT thread.

I'll admit I'm not sure if the size is set correctly with scaling this way (I don't have a system with system UI scaling to test on), and/or whether a resize event is generated when the canvas is added, nor am I sure whether you would argue that I should just set the size of the canvas after I've added it (I currently call setSize in the constructor of my AWTGLCanvas subclass). I guess I'm saying "feel free to comment", but this is my naïve suggestion.

Before the canvas has been added to a parent, its GraphicsConfiguration
is null, causing the resize event from eg. a setSize to throw an exception
on stderr from the AWT thread.
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.

1 participant