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

Project always starts in maximized window #37155

Open
lukaskotik opened this issue Mar 18, 2020 · 11 comments
Open

Project always starts in maximized window #37155

lukaskotik opened this issue Mar 18, 2020 · 11 comments

Comments

@lukaskotik
Copy link

Godot version: 3.2.1 stable

OS/device including version: Ubuntu 18.04.4, 2 monitors, main monitor 2560 x 1440, GTX 1060
driver 435.21
Issue description: The project window size setting settings and editor window placement setting are ignored. Whatever I set, the project window always start maximized (OS.window_maximized always true on startup). It holds both for exported project and project run from editor. Maybe related to #36462 and #35571

Steps to reproduce: Set window width and height to smaller values than the resolution of the screen and run the project.

@Calinou
Copy link
Member

Calinou commented Mar 18, 2020

I can reproduce this on commit 0d907a6 (Fedora 31, KDE, NVIDIA). I wonder if it might come from KWin overrides I may accidentally have applied to other processes though. (I sometimes apply fullscreen overrides to game processes that don't support borderless fullscreen.)

@lukaskotik
Copy link
Author

I am using Gnome Shell hence it most likely isn't connected with KWin overrides itself.

@lukaskotik
Copy link
Author

I think that everything could run as expected if OS.set_window_maximized(false) when starting the application and when not in fullscreen.

@ghost
Copy link

ghost commented Mar 19, 2020

Not Linux specific AFAIK, as I get the same behavior on Windows 10 (1909)

@lukaskotik
Copy link
Author

I found out that it does not happen if the width and height from project settings is small compared to the resolution of the monitor. For instance on 2560 x 1440 monitor and project in 1920 x 1080 it starts maximized. If the project is set to 1024 x 600 (default) it does not happen

@ghost
Copy link

ghost commented Mar 23, 2020

I'm not quite sold on that. I can reproduce on a UHD screen with any window size I've tested

@Agudar
Copy link

Agudar commented Mar 10, 2022

In editor settings set run/window_placement to centered.

@akien-mga
Copy link
Member

I'm puzzled by the (now a bit old) bug report, I don't recall seeing this behavior. Is this still reproducible as of current 3.4.4 or 3.5 RCs?

To be clear, you didn't enable this setting? Editor Settings / Run / Window Placement / Rect = Force Maximized

@lumakyu
Copy link

lumakyu commented Aug 19, 2022

I just arrived here from a Google search because I'm experiencing the very same problem still.

Godot version: v3.5.stable.mono.official [991bb6a]
OS / system info: Arch Linux (updated today) using GNOME 42.4 on X11, main monitor 2560x1440, GTX 1070 using proprietary NVIDIA driver version 515.65.01

How to reproduce:

  • create a new project
  • add an empty default scene
  • adjust resolution in Project Settings -> Display -> Window -> Size -> Width/Height to 1920x1080
  • launch the project from the editor using the run button (F5)

In my case, the issue only appears when the resolution is reasonably large.
For instance, 1600x900 has the project launching in windowed mode just fine but 1920x1080 always has it starting maximized.

I can also confirm this issue takes place in both the editor and exported Linux binaries of the project.

To illustrate the point, here's what the behavior looks like on my system:

recording.mp4

@Calinou Calinou added this to the 3.x milestone Aug 19, 2022
@amb
Copy link

amb commented Oct 28, 2022

I have the same issue. Editor always starts maximized no matter what I do. Godot version 3.4.3, 3.5.1, 4.0-beta3. Including versions compiled from source/master. Recently updated from Windows 10 to Windows 11 Pro Insider Preview Build 25231. 4k display. Here are all the errors I get:

Godot Engine v4.0.beta3.official.01ae26d31 - https://godotengine.org
ERROR: Condition "!windows.has(p_window)" is true.
   at: window_resize (drivers/vulkan/vulkan_context.cpp:1601)
Vulkan API 1.2.0 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 2070

ERROR: Condition "font.is_null()" is true.
   at: _shape (scene/gui/line_edit.cpp:2202)
ERROR: Condition "font.is_null()" is true.
   at: _shape (scene/gui/line_edit.cpp:2202)
ERROR: Condition "font.is_null()" is true.
   at: _shape (scene/gui/line_edit.cpp:2202)
ERROR: Condition "font.is_null()" is true.
   at: _shape (scene/gui/line_edit.cpp:2202)
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:76)
WARNING: FBX file import is enabled in the project settings, but no FBX2glTF path is configured in the editor settings. FBX files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:100)

Latest updated Nvidia drivers. #67539 doesn't seem to fix it (it only removes error messages), but waiting for later betas because I'm not familiar with the compiling process and if I'm doing something wrong.

Manually entering all wanted parameters from the command line works as expected:

Godot_v4.0-beta3_win64.exe -e --path C:\Path\To\Project -w

Removing the '-w' again makes the window maximized, even though project and editor settings are windowed and centered.

@Calinou
Copy link
Member

Calinou commented Oct 28, 2022

Editor always starts maximized no matter what I do.

This is an unrelated issue. Starting maximized is the editor's hardcoded behavior, and the CLI arguments being ignored for this case is a separate issue. See also #32056.

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

No branches or pull requests

6 participants