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

The project's window title isn't visible when using a floating game window #101539

Closed
Calinou opened this issue Jan 14, 2025 · 2 comments · Fixed by #101809
Closed

The project's window title isn't visible when using a floating game window #101539

Calinou opened this issue Jan 14, 2025 · 2 comments · Fixed by #101809

Comments

@Calinou
Copy link
Member

Calinou commented Jan 14, 2025

Tested versions

  • Reproducible in: 4.4.dev7, 4.4.dev 24d7451
  • Not reproducible in: 4.3.stable

System information

Godot v4.4.dev (24d7451) - Fedora Linux 41 (KDE Plasma) on X11 - X11 display driver, Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4090 (nvidia; 565.77) - 13th Gen Intel(R) Core(TM) i9-13900K (32 threads)

Issue description

The window title doesn't follow the user-defined title on the root Window node anymore when it's a floating game window:

Image

If you don't change the window title yourself, it's set to the project name by default (with a (DEBUG) suffix since this is an editor build) and this isn't seen either when it's a floating game window.

In contrast, this is how it looks like without the floating window system (and with embedding disabled):

Image

Steps to reproduce

  • Enable game window embedding with a floating window.
  • Call get_window().title = "Something" in a script.
  • Notice how the window title doesn't change and remains set to Game Workspace.

Minimal reproduction project (MRP)

test_window_title.zip

@Hilderin
Copy link
Contributor

Hilderin commented Jan 14, 2025

I don't think it's really the expected behavior in my opinion because the floating window is not the game window. I could be wrong. Just to clarify, why do you need the floating window to have the same title as the game window?

After reviewing some of the issues you created, I believe one way to address all these problems could be to implement a mode where the floating window acts as a floating toolbar, positioned either on top of or beside the game window, and contains only the "Game View" toolbar. This approach would resolve issues such as using window manager shortcuts in the game view, the game view title, the viewport size from the project settings, and the problem where the game window's size or position occasionally falls out of sync. Implementing this mode should be simpler and less prone to issues, as it would only require ensuring that the "Game View Toolbar window" follows the game window when it moves or resizes. It could be hidden in fullscreen mode or always stay on top of the screen. Additionally, it would work on Mac!

Conversely, fixing the submitted issues directly would be quite complex and time-consuming, and I am almost certain that some are simply impossible to fully resolve.

Here’s an illustration of the concept:

Image

I’m referring to these issues:
#100883
#101415

What do you think of this suggestion?

@Calinou
Copy link
Member Author

Calinou commented Jan 19, 2025

Just to clarify, why do you need the floating window to have the same title as the game window?

I'd like to be able to test logic related to setting the window title, e.g. if I'm developing a non-game application and want the currently open file to be visible in the window title:

Image

Additionally, making it part of the window title means it'll appear when alt-tabbing around, even when using a floating game window.

If we really don't want to lose the "game window" indication, we could make the existing game window text a prefix to the actual window title set by the project (and keep the (DEBUG) suffix so users are aware that running the project from the editor won't exhibit full performance).

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

Successfully merging a pull request may close this issue.

2 participants