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

Move resizing out of Window.focus, and into Window.init_for_scene #2274

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

3b1b
Copy link
Owner

@3b1b 3b1b commented Dec 12, 2024

Somewhat confusingly, the window viewport can get offset on initialization, and on reload, in a way that simply resizing the window (even to its current size) fixes.

Previously I had added this to Window.focus, while also calling focus in Window.init_for_scene. Better is to not necessarily focus on init, and to put the sync line in there directly. This should partially address the annoyance in #2271

@Splines
Copy link
Contributor

Splines commented Dec 12, 2024

What do you mean by "resyncing" in "resyncing the viewport" here?

@3b1b
Copy link
Owner Author

3b1b commented Dec 12, 2024

The symptom is that the scene appears off center in the Window. I'm not 100% sure what's going on, if I was there would probably be a more principled fix than simply calling "resize" arbitrarily.

@3b1b 3b1b deleted the simpler-window-focus branch December 26, 2024 17:37
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.

2 participants