-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
[4.0.beta9] Minimum window size not applied at startup #70347
Comments
|
I don't think this is supposed to work to begin with. If you want to enforce a minimum size of a window node, you need to do it on the node itself. Because the moment This was the only thing that the offending PR did that could cause the issue to appear, it calls So it worked before by a happenstance. And now we're almost guaranteed to call for an update on the window size for any window, which highlights the issue in your code immediately. |
But it works in 4.0 beta 8 and 3.5.1. If you run the project without any code, the window should be (64, 64), but it near (0, 0). https://docs.godotengine.org/en/latest/classes/class_displayserver.html#class-displayserver-method-window-set-min-size |
Windowing works differently in 3.5, so it's not relevant here. As for 4.0, as I've explained, this worked by accident. Window nodes do not take the display server into account, they tell the display server their minimum size after computing it themselves. Telling the display server that your window should have some minimum size without telling your window the same is not going to work as expected. I'm not sure if there is an underlying implementation issue with the windowing, but it's not the linked PR that created the issue. You can reproduce the same problem in beta 8 with
Because So to summarize, the main window needs to be told that it has a min size, otherwise it will, at some point, recalculate its size using its internal data and tell |
Godot version
v4.0.beta9
System information
Windows 10
Issue description
Minimum window size not applied at startup and
DisplayServer.window_set_min_size
isn't work as expected.Steps to reproduce
Minimum size must be (64, 64).
Isn't work in beta9:
Works in beta9:
Minimal reproduction project
window_min_size_bug.zip
The text was updated successfully, but these errors were encountered: