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

Add a project setting to enable exclusive fullscreen on Windows #4413

Closed
Lielay9 opened this issue Apr 17, 2022 · 5 comments · Fixed by godotengine/godot#65816
Closed

Add a project setting to enable exclusive fullscreen on Windows #4413

Lielay9 opened this issue Apr 17, 2022 · 5 comments · Fixed by godotengine/godot#65816

Comments

@Lielay9
Copy link

Lielay9 commented Apr 17, 2022

Describe the project you are working on

Porting a generic project to 4.0 (Not relevant to the proposal).

Describe the problem or limitation you are having in your project

Godot 4.0, has the ability to enable exclusive fullscreen, but only when the project is running.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

As a project setting the window will automatically start in the selected mode, which means that it doesn't need to be changed during run-time. For example with override.cfg the project could be started with the preferred configuration. While only a minor inconvenience, it would result in less boilerplate code and window flashing & resizing in almost every project that wants to support the exclusive fullscreen mode.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

A better implementation: #4413 (comment)
Original for reference:
Add a boolean value to project settings to enable exclusive fullscreen on relevant platforms (aka Windows).

Setting

(Imagine the row to be under Fullscreen)
(PS at least in alpha 6 the last vowels of custom project settings seem to get doubled for whatever reason)

If this enhancement will not be used often, can it be worked around with a few lines of script?

You can change the mode at run-time but not really during launch as proposed.
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_EXCLUSIVE_FULLSCREEN)

Is there a reason why this should be core and not an add-on in the asset library?

AFAIK cannot be an addon.

@Calinou
Copy link
Member

Calinou commented Apr 17, 2022

cc @bruvzg

For 4.0, I suggest replacing the Fullscreen and Borderless boolean project settings with a Window Type enum project setting:

  • Window
  • Borderless Window
  • Fullscreen
    • Standard Godot fullscreen mode.
  • Exclusive Fullscreen
    • Acts like Fullscreen on non-Windows platforms.

This prevents picking combinations that don't make sense.

@Calinou Calinou added this to the 4.0 milestone Apr 17, 2022
@Calinou Calinou changed the title [4.0] Add a project setting to enable exclusive fullscreen on relevant platforms Add a project setting to enable exclusive fullscreen on Windows Apr 17, 2022
@Lielay9
Copy link
Author

Lielay9 commented Apr 17, 2022

cc @bruvzg

For 4.0, I suggest replacing the Fullscreen and Borderless boolean project settings with a Window Type enum project setting:

  • Window

  • Borderless Window

  • Fullscreen

    • Standard Godot fullscreen mode.
  • Exclusive Fullscreen

    • Acts like Fullscreen on non-Windows platforms.

This prevents picking combinations that don't make sense.

I should've included this in the proposal. I'm also in favour of this approach but thought that it would be favourable to preserve compatibility with 3.x projects. As long as all relevant combinations can be set before the window is created, all is fine for me.

@Calinou
Copy link
Member

Calinou commented Apr 17, 2022

I'm also in favour of this approach but thought that it would be favourable to preserve compatibility with 3.x projects.

3.x doesn't have support for exclusive fullscreen, so unless it's backported, we don't have to cater to it.

Even if exclusive fullscreen is backported to 3.x, we can still have a different API for configuring the settings there (with an additional boolean property). This is generally how new features are backported from master to 3.x 🙂

@Lielay9
Copy link
Author

Lielay9 commented Apr 17, 2022

Even if exclusive fullscreen is backported to 3.x, we can still have a different API for configuring the settings there (with an additional boolean property). This is generally how new features are backported from master to 3.x 🙂

Figures.

On a side note, I doubt having the last vowels of a custom project settings name getting repeated is intentional. Does this warrant opening an issue or is it perhaps already addressed? (Alpha 6)

@Calinou
Copy link
Member

Calinou commented Apr 17, 2022

On a side note, I doubt having the last vowels of a custom project settings name getting repeated is intentional. Does this warrant opening an issue or is it perhaps already addressed? (Alpha 6)

This is likely a regression from godotengine/godot#58706. Please open an issue for this on the main Godot repository. I've been able to reproduce this too but I don't know exactly why it's broken.

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.

2 participants