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

Separate window creation in OSWindow.Show() to allow creation in the background #5489

Merged
merged 5 commits into from
Oct 17, 2024

Conversation

wixoaGit
Copy link
Contributor

OSWindow wouldn't create the window and its UI root until Show() was called. This caused issues for controls we needed to initialize & run before ever being visible. Now they are both created immediately, with Show() being used to make them visible.

This also required being able to set a window's size after creation, so I added the ability to do that. This is something OpenDream was going to need at some point anyway.

OSWindow now created ClydeWindow and WindowRoot immediately, but non-visible in the background
Also added the ability to programatically resize an open window
Copy link

@Iamgoofball Iamgoofball left a comment

Choose a reason for hiding this comment

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

░░░░░░░░░░░░▄▄
░░░░░░░░░░░█░░█
░░░░░░░░░░░█░░█
░░░░░░░░░░█░░░█
░░░░░░░░░█░░░░█
███████▄▄█░░░░░██████▄
▓▓▓▓▓▓█░░░░░░░░░░░░░░█
▓▓▓▓▓▓█░░░░ PJB, ░░░░░░░█
▓▓▓▓▓▓█░░░░Add This░░░░█
▓▓▓▓▓▓█░░░░Please!░░░░░█
▓▓▓▓▓▓█░░░░░░░░░░░░░░█
▓▓▓▓▓▓█████░░░░░░░░░█
██████▀░░░░▀▀██████▀

Copy link
Member

@PJB3005 PJB3005 left a comment

Choose a reason for hiding this comment

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

Definitely not a fan of the breaking changes introduced here. Would it be possible to add a new function instead that creates the window without showing?

@wixoaGit
Copy link
Contributor Author

Definitely not a fan of the breaking changes introduced here. Would it be possible to add a new function instead that creates the window without showing?

Yea, splitting Show() into a Create() and Show() probably would have been better. I'll redo it like that.

@wixoaGit wixoaGit requested a review from PJB3005 October 17, 2024 00:43
@wixoaGit wixoaGit changed the title Have OSWindow immediately create the window in the background Separate window creation in OSWindow.Show() to allow creation in the background Oct 17, 2024
@wixoaGit
Copy link
Contributor Author

The tests are passing on my machine

@PJB3005 PJB3005 merged commit 46143d2 into space-wizards:master Oct 17, 2024
2 of 3 checks passed
@wixoaGit wixoaGit deleted the oswindow_changes branch October 17, 2024 15:38
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