Godot: Wrong window position when running a project when "Allow Hidpi" is disabled

Created on 12 Feb 2018  路  13Comments  路  Source: godotengine/godot

Godot version:
3.0

OS/device including version:
OSX 10.12.6 (16G1212), MacBook Pro, NVIDIA GeForce GT 750M 2048 MB (with Apple default drivers).
Screen 1 is a 28" 4K display, Screen 2 is my laptop's 15" HiDPI display

Issue description:
I've just downloaded Godot for the first time, installed a few projects, and pressed "Play" (or "Play Scene", doesn't change anything)

When the game appears, it does so on a tiny corner of my first monitor. You can see my monitor layout on this image, as well as where the game appears (bottom right corner). I can only see the "Close" and "Minimize" buttons of the window, as well as drag it.
layout

I've tried with the Editor settings, specifically "Window Placement", and it seems that if I select Monitor 2 (my laptop's display) everything works as expected. However, with Default (or Monitor 1) I get this strange behavior. Also, if I change "Centered" to "Top Left" I see more of the window, but it's still located at the wrong position, just a bit more up and left that before.

Steps to reproduce:

  1. Run any project

Minimal reproduction project:
Any project, it doesn't matter.

bug macos editor

Most helpful comment

I fixed the problem by enabling _Allow Hidpi_, under _Project Settings -> Display -> Window -> Dpi_.

All 13 comments

Might be related to #13017.

Might be, but the strange part is that it works on my second monitor, which is also HiDPI.

In any case, thank you for your comment, hopefully this can be fixed without too much trouble :).

I've tried with 3.0.2, same behavior there

hello, I am new here I have the same problem. the top left corner seems to be centered on my screen. is it possible that the position of the window is being centered by the top left corner and not the center of the displayed window itself?

the top left position works(only other one i have tried)

godot 3.0.2 , windows 10 16299.309

Same problem with @trsBasicLine10 in Window10, is there any solution? Thanks!

Any workaround to fix this?

Fixed by configuring the position on Editor Settings -> Run -> Window Placement, you can use Custom Position, with custom Rect Custom Position and fix the issue. The issue seems to be the auto-detection of the center of the monitor is buggy, glad that the devs let us fix that manually, thanks.

I fixed the problem by enabling _Allow Hidpi_, under _Project Settings -> Display -> Window -> Dpi_.

Turning on Hidpi fixed my issue too.

Not platform specific it seems. Had this problem with Windows 8.1, Allow Hidpi fixed it.

@eduardonunesp fixed my issue.

Macbook pro 13 with external monitor hidpi.

@okapii Which stretch mode are you using? If you want your project to display correctly on hiDPI displays, it must handle multiple resolutions. This is usually done by setting the stretch mode to 2d and stretch aspect to expand.

@Calinou Sorry, I deleted my original post just before you replied. The issue occurs with 2d and expand but only with the container-node. I replaced it with the MarginContainer-Node and things work fine now. So either I do not understand the workings of those two in great enough detail or there might be a bug in the container-node.

Was this page helpful?
0 / 5 - 0 ratings