-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Viewport width & height are incorrect on Windows when Resizable is disabled (DisplayServer regression) #62869
Comments
I have the same issue in Godot alpha 13 with Windows 11 |
@Granpappy Can you reproduce this when Resizable is enabled in the Project Settings (which is the default)? |
No, I can't. Would that mean it's something I'm doing wrong? |
Happens here as well, only with resizable OFF. I counted 10 pixels on my end. I tried changing back and forth from resizable to non-resizable with the following snippet triggered by an input. It clearly adds the extra 10 pixels when the flag is set to true, and removes them when the flag is false.
|
Godot version
4.0 alpha 11
System information
Windows 10
Issue description
Setting the viewport width and depth results in the true viewport size being +12 pixels for both width and height.
Tried setting the viewport via Project Settings -> General -> Display -> Window and noticed when I'd run my project, the viewport was showing things that shouldn't be visible. Printed the viewport size (
get_viewport().get_visible_rect()
) and confirmed that the sizing was off by +12 for both width & height. Putting width and height dimensions in that are 12 less than what I actually want gives correct viewport visuals.Can't find any project setting that addresses why it would add twelve to both width & height, so I'm assuming this is an error. Checked on Godot 3 and it works as intended.
(NOTE : This only happens when the stretch mode is set to disabled)
Steps to reproduce
Set the viewport width and height via Project Settings -> General -> Display -> Window
Make a simple scene with a Node and attach a script with
print_debug(get_viewport().get_visible_rect())
in_ready()
Run the scene and the output will show that the width & height are both off by +12 from what was put under the settings
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: