# Multi-monitor bug with 4K display

**URL:** <https://discourse.glfw.org/t/multi-monitor-bug-with-4k-display/2970>\
**Category:** support\
**Created:** [October 14, 2025, 3:28pm UTC](https://discourse.glfw.org/t/multi-monitor-bug-with-4k-display/2970 "2025-10-14T15:28:22Z")\
**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:** [October 14, 2025, 3:28pm UTC](https://discourse.glfw.org/t/multi-monitor-bug-with-4k-display/2970/1 "2025-10-14T15:28:22Z")

</div>

I am testing multi-monitor support for my GLFW application and I have come across a bug. The code I am using works 100% fine with 2 monitors, if one monitor is 1920x1080 and the second is 1920x1200, but if the second monitor is a 4K monitor then a lot weird stuff starts happening.

If I choose a window size of 1536x864 on the second monitor, a 3840x2160 window is created, with the entire area black and the1536x864 area of content in the bottom left corner!

If I choose a window size of 2560x1440 on the second monitor, this time the window is created with the correct size, but the mouse co-ordinates are wrong - they are offset 50 pixels downwards.

This is the code I am using:

```c
int numMonitors;
GLFWmonitor** monitors = glfwGetMonitors(&numMonitors);

```

int xPos;  
int yPos;  
int widthWorkArea;  
int heightWorkArea;  
glfwGetMonitorWorkarea(monitors[m\_ixMonitorCurr], &xPos, &yPos, &widthWorkArea, &heightWorkArea);

```auto
	if (m_posWindow.m_x < xPos || m_posWindow.m_x >= xPos+widthWorkArea) m_posWindow.m_x = xPos;
	if (m_posWindow.m_y < yPos || m_posWindow.m_y >= yPos+heightWorkArea) m_posWindow.m_y = yPos;

```

```auto
		glfwWindowHint(GLFW_DECORATED, GL_FALSE);
			g_pWindow = glfwCreateWindow(pMonitorSettings->GetScreenWidth(),
				pMonitorSettings->GetScreenHeight(), "Merc Tactics", NULL, NULL);
			glfwSetWindowPos(g_pWindow, m_posWindow.m_x,
				m_posWindow.m_y);

```

---

<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:** [October 14, 2025, 3:56pm UTC](https://discourse.glfw.org/t/multi-monitor-bug-with-4k-display/2970/2 "2025-10-14T15:56:11Z")

</div>

Hi @lefty

What version of GLFW and what are the details of the system you are using (OS + Window system if using Linux)?

---

<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:** [October 14, 2025, 5:51pm UTC](https://discourse.glfw.org/t/multi-monitor-bug-with-4k-display/2970/3 "2025-10-14T17:51:40Z")

</div>

it’s GLFW 3.3.9 and the OS is Windows 10.

Funnily enough the same code works perfectly on Linux

---

<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:** [October 15, 2025, 11:13am UTC](https://discourse.glfw.org/t/multi-monitor-bug-with-4k-display/2970/4 "2025-10-15T11:13:31Z")

</div>

I would first try GLFW 3.4 or the latest from Github.

If you still have issues I would then investigate whether this might be related to Window Content Scale: [GLFW: Window guide](https://www.glfw.org/docs/latest/window_guide.html#window_scale)

There are a number of multi-monitor related issues on Github For Windows, but I can’t find any exactly related to yours nor can I replicate this (but I also don’t have a 4k monitor to test with).

---

<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:** [October 15, 2025, 8:32pm UTC](https://discourse.glfw.org/t/multi-monitor-bug-with-4k-display/2970/5 "2025-10-15T20:32:58Z")

</div>

Thanks for the answer. I will try 3.4
