# Glfwinit() makes existing windows lose scaling (win11 .NET)

**URL:** <https://discourse.glfw.org/t/glfwinit-makes-existing-windows-lose-scaling-win11-net/2452>\
**Category:** support\
**Created:** [September 18, 2023, 11:33am UTC](https://discourse.glfw.org/t/glfwinit-makes-existing-windows-lose-scaling-win11-net/2452 "2023-09-18T11:33:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [September 18, 2023, 1:48pm UTC](https://discourse.glfw.org/t/glfwinit-makes-existing-windows-lose-scaling-win11-net/2452/2 "2023-09-18T13:48:42Z")

</div>

GLFW isn’t really designed to be used in a program which already has other windows opened, and so it sets the process DPI awareness which is likely what causes the other windows to change. See the code in `_glfwInitWin32`:

> <https://github.com/glfw/glfw/blob/master/src/win32_init.c#L694-L699>

You can use the `GLFW_SCALE_TO_MONITOR` [window hint](https://www.glfw.org/docs/latest/window_guide.html#window_hints) to ensure GLFW scales it’s windows to the monitor for you automatically, but this will not apply to the already created windows.

Without altering GLFW one solution would be to initialize GLFW before creating the other windows and then setting their size/scale (if possible) using the [monitor content scale](https://www.glfw.org/docs/latest/monitor_guide.html#monitor_scale).

---

_[View the full topic](https://discourse.glfw.org/t/glfwinit-makes-existing-windows-lose-scaling-win11-net/2452)._
