godotengine / godotengine/godot

DPI setting is not taken into account upon window creation

Open
#102,482 1 comment 1 reaction 0 assignees View on GitHub
bug topic:gui
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

4.4-beta2_mono, 4.3-stable_mono

### System information

Godot v4.3.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Ti (NVIDIA; 32.0.15.6636) - Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 Threads)

### Issue description

This applies to both Godot Editor and Godot output executable.

If we set window size to 800x600 and change DPI setting while the app is running, the window size changes accordingly.
However, if we set window size to 800x600, close the app, change DPI setting, start the app, it starts with 800x600 size.

The way it should be, I'd assume, is that it should start with the size 800x600 multiplied by whatever DPI setting is currently set.

### Steps to reproduce

See above.

### Minimal reproduction project (MRP)

N/A

Contributor guide

Open the contributing guide

Research direction

Reproduce on Windows 10 with Godot 4.3.stable_mono using an 800x600 window, changing the system DPI while the application is closed. Start by tracing the window-creation path and its DPI handling for both the editor and output executable. Done means startup applies the current DPI to the configured 800x600 size, matching the behavior after changing DPI while running.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.