-
-
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
Godot uses exclusive fullscreen on Windows if window size matches screen size, even if borderless is enabled in the Project Settings (fixed in master
)
#60665
Comments
This happens because Godot 3.x actually uses exclusive fullscreen if the window size matches the screen size (even if the Borderless project setting is enabled). You can work this around by setting the window size to be one pixel smaller on one of the axes. This was remedied in Godot 4.0alpha by adding separate borderless window and exclusive fullscreen modes. Unfortunately, it's not easy to fix in Godot 3.x which doesn't use the backwards-incompatible DisplayServer abstraction. |
I was sure that Juan had mentioned exclusive fullscreen being unnecessary on Windows 10 and upwards, but I've always wished 3.x had exclusive fullscreen as it can definitely boost performance. Is it back-portable? |
No, it needs to be redone from scratch for That said, Godot already uses exclusive fullscreen in |
The engine should use exclusive fullscreen only if the application demands it, not with some magic window sizes. You assume here that there are no side-effects of supplementing screen-matching borderless window with exclusive fullscreen - but there are, and games implement the choice for the player to use one or the other as a troubleshooting tool. Having to hack my way around to have screen-covering borderless window instead of full-screen is hardly developer-friendly, especially if this is as obfuscated as it is here. |
Since I stumbled on the same issue, this is how I did it without magic window sizes:
The key here is the SWP_NOSENDCHANGING parameter, this will avoid notifying Godot about the window resize (but the OGL framebuffer will update correctly). |
master
)
Side note: I found that if you constrain the mouse cursor BEFORE setting your window borderless using the code above, Godot won't update the constrained area, but you can call set_mouse_mode(Input::MOUSE_MODE_CONFINED); after SetWindowPos() to force Godot to update. |
I can confirm that despite the DisplayServer overhaul in Godot 4.0 (stable release), this is still equivalent to the behavior I'm seeing in Windows 10. Should this issue here be updated to add 4.0 as well, or should I submit that as a new issue? |
Unlike Godot 3, Godot 4 has separate Fullscreen and Exclusive Fullscreen window modes you can choose in the advanced Project Settings. Are you using a windowed mode, but with the window size set to be equal to the screen size? |
I favour a workaround of adding |
Godot version
v3.4.4.stable.mono.official
System information
Windows 10, GLES3, AMD Radeon RX 6800 XT
Issue description
I seem to be experiencing the same behavior described in #11762. The issue was closed several years ago from the author deleting their account, and the comments say to create a new issue, so I've made one.
Setting the following values occurs in a screen flicker when alt-tabbing, even though my assumption is a borderless "fullscreen" game would not do that:
Apologies if what I'm saying doesn't make much sense (lol), I'm starting a new project with Godot and the borderless option doesn't seem to do what I expect when the window size is the size of my monitor ("borderless maximized window", as the old issue's title says). This also seems to break screenshots, as described in the old issue I've linked.
Steps to reproduce
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: