# Problems with 2 monitor setup in GLFW

**URL:** <https://discourse.glfw.org/t/problems-with-2-monitor-setup-in-glfw/2530>\
**Category:** support\
**Created:** [January 13, 2024, 1:51pm UTC](https://discourse.glfw.org/t/problems-with-2-monitor-setup-in-glfw/2530 "2024-01-13T13:51:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lefty](https://avatars.discourse-cdn.com/v4/letter/l/85e7bf/32.png) [@lefty](https://discourse.glfw.org/u/lefty)\
**Post date:** [January 13, 2024, 1:51pm UTC](https://discourse.glfw.org/t/problems-with-2-monitor-setup-in-glfw/2530/1 "2024-01-13T13:51:28Z")

</div>

I have a problem running a GLFW application on a Windows 10 PC with two monitors. Monitor 1 is 1920x1080 and monitor 2 is 1920x1200. The application starts in monitor 1 and everything is fine. When I drag the application to the second monitor, once it’s half way across, the window resizes to be smaller and is too small to fit the content. Also, the mouse no longer works properly. It gets a wrong offset, causing it to click in the wrong position.

Is this a known problem with GLFW?

---

<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:** [January 13, 2024, 4:21pm UTC](https://discourse.glfw.org/t/problems-with-2-monitor-setup-in-glfw/2530/2 "2024-01-13T16:21:40Z")

</div>

This could be due to the monitors having a different content scale, along with how the application is coded. Can you check if either of your monitors Scale is set in the Display settings to anything other than 100%?

Additionally do you have `GLFW_SCALE_TO_MONITOR ` window hint set?

---

<div class="post-metadata">

**Author:** ![lefty](https://avatars.discourse-cdn.com/v4/letter/l/85e7bf/32.png) [@lefty](https://discourse.glfw.org/u/lefty)\
**Post date:** [January 13, 2024, 5:43pm UTC](https://discourse.glfw.org/t/problems-with-2-monitor-setup-in-glfw/2530/3 "2024-01-13T17:43:55Z")

</div>

Yeah, one of them is on 120%.  
what does the GLFW\_SCALE\_TO\_MONITOR flag do?

---

<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:** [January 13, 2024, 6:16pm UTC](https://discourse.glfw.org/t/problems-with-2-monitor-setup-in-glfw/2530/4 "2024-01-13T18:16:18Z")

</div>

See the documentation on [GLFW Window Hints](https://www.glfw.org/docs/3.3/window_guide.html#window_hints_wnd).

Which of the monitors do you have at 120% and do you have `GLFW_SCALE_TO_MONITOR` set?

Also are you [checking your framebuffer size](https://www.glfw.org/docs/3.3/window_guide.html#window_fbsize) and resizing content appropriately? If you’re just assuming one set framebuffer size and it changes this could cause the issues you mention.

---

<div class="post-metadata">

**Author:** ![lefty](https://avatars.discourse-cdn.com/v4/letter/l/85e7bf/32.png) [@lefty](https://discourse.glfw.org/u/lefty)\
**Post date:** [January 14, 2024, 2:59pm UTC](https://discourse.glfw.org/t/problems-with-2-monitor-setup-in-glfw/2530/5 "2024-01-14T14:59:11Z")

</div>

No, I don’t check framebuffer size, but anyway I set the scaling to 100% and the problem went away. Thanks for the answer 😉
