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

Fullscreen is treated as an Exclusive Fullscreen on Windows #78723

Closed
Lielay9 opened this issue Jun 26, 2023 · 6 comments · Fixed by #79016
Closed

Fullscreen is treated as an Exclusive Fullscreen on Windows #78723

Lielay9 opened this issue Jun 26, 2023 · 6 comments · Fixed by #79016

Comments

@Lielay9
Copy link
Contributor

Lielay9 commented Jun 26, 2023

Godot version

v4.1.beta3.official [ada712e]

System information

Godot v4.1.beta3 - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4090 (NVIDIA; 31.0.15.3623) - AMD Ryzen 9 7950X 16-Core Processor (32 Threads)

Issue description

Related: #77378 (Might be caused by this).

When a project is launched with display/window/size/mode set to Fullscreen the main window will instead open in Exclusive Fullscreen. Moving the window in place seems to fix this, but I'm hesitant to call that a proper solution:

I.e. add MoveWindow(...) after creating the window here (or during it):

WindowID main_window = _create_window(p_mode, p_vsync_mode, p_flags, Rect2i(window_position, p_resolution));

It might be enough to send one of the messages that MoveWindow does https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-movewindow#remarks but I haven't tested.

Steps to reproduce

Open a project on Windows with display/window/size/mode set to Fullscreen.

Minimal reproduction project

N/A

@Lielay9 Lielay9 changed the title Fullscreen is treated as a Exclusive Fullscreen on Windows Fullscreen is treated as an Exclusive Fullscreen on Windows Jun 26, 2023
@Yadnesh-Kulkarni
Copy link

@Lielay9 The expected outcome for this should be to have a borderless fullscreen for Fullscreen mode and complete ownership of display for exclusive fullscreen mode right?

@Lielay9
Copy link
Contributor Author

Lielay9 commented Jun 26, 2023

@Lielay9 The expected outcome for this should be to have a borderless fullscreen for Fullscreen mode and complete ownership of display for exclusive fullscreen mode right?

In practice, yes. You can find the details of how that is implemented here, where the window is created...:

DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect) {

... and here where the mode is changed:
void DisplayServerWindows::window_set_mode(WindowMode p_mode, WindowID p_window) {

@Yadnesh-Kulkarni
Copy link

Okay. I am halfway through debugging this. I will revert once I have any update.

@KoBeWi
Copy link
Member

KoBeWi commented Jun 27, 2023

Sounds related to #60665

@Yadnesh-Kulkarni
Copy link

Looks fairly similar or may even be a duplicate. Once I can debug through play window, I can be sure. Will update here as soon as I have a lead.

@Yadnesh-Kulkarni
Copy link

Should Fullscreen mode have a Titlebar while displaying? If not then turning on Borderless Window property in property manager seems to have solved this. Though, I think turning on borderless window by default while turning on the Fullscreen mode should be the right solution for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants