godot icon indicating copy to clipboard operation
godot copied to clipboard

[BUG] Title bar hidden in windowed mode when viewport is higher than display resolution

Open conde2 opened this issue 1 year ago • 5 comments

Tested versions

v4.3.stable.mono.official [77dcf97d8]

System information

Godot v4.3.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Ti (NVIDIA; 31.0.15.3623) - AMD Ryzen 7 3700X 8-Core Processor (16 Threads)

Issue description

image

As you can see no title bar is shown when running the game:

image

Steps to reproduce

Set the window to something higher than your monitor screen resolution and see that the title bar is not displayed when the game is launch.

My display resolution is 1920x1080

My godot project: image

Minimal reproduction project (MRP)

test-screen-size.zip

conde2 avatar Aug 16 '24 23:08 conde2

What would you suggest should happen instead? The window is set to launch on the center of the screen, should it:

  • Ignore the centering and place itself so the bar is visible (putting other parts of the window off the screen)
  • Should it resize to fit and ignore the requested size

AThousandShips avatar Aug 17 '24 09:08 AThousandShips

There are two problems at the current approach, of just centering. Best

  1. Currently the viewport is cut at the bottom because of the windows toolbar, making it display less content that is supposed to show.

  2. The window bordered title bar is not displayed

What I suggest is first consider the window title bar size, sums it up to the viewport size and then center it. (Your second option)

Also when centering and resizing consider the windows toolbar size.

There are the borderless option to anyone that wants to keep this current behaviour. But at the current state its not possible to have title bar in bigger viewport resolutions

conde2 avatar Aug 17 '24 16:08 conde2

It is centered though? How would the bar be visible when the window is 260 pixels outside the screen to the top?

AThousandShips avatar Aug 17 '24 16:08 AThousandShips

It's covering the entire screen so I believe yes it's centered. I can't tell for sure.

So that's what I'm talking about, it should consider that extra size of the title bar when resizing.

Currently it already resizes to fit the screen and then centers it. But it uses the viewport size to calculate this, ignoring the title bar size.

conde2 avatar Aug 17 '24 17:08 conde2

Thank you that's clearer! Can confirm that it resizes in that way, but would be relevant to discuss and document exactly how to handle that

AThousandShips avatar Aug 17 '24 17:08 AThousandShips

And where would that be better to do? In a proposal or in this issue?

Because I belive this is more a bug than anything else. Also could you confirm the bug? I'm not sure because there is no confirmed label.

conde2 avatar Aug 18 '24 23:08 conde2