diff --git a/README.md b/README.md index 07d2e547..70f94f13 100644 --- a/README.md +++ b/README.md @@ -349,6 +349,10 @@ information on what to include when reporting a bug. - [Wayland] Bugfix: Size limits included frame size for fallback decorations - [Wayland] Bugfix: Updating `GLFW_DECORATED` had no effect on server-side decorations + - [Wayland] Bugfix: A monitor would be reported as connected again if its scale + changed + - [Wayland] Bugfix: `glfwTerminate` would segfault if any monitor had changed + scale - [POSIX] Removed use of deprecated function `gettimeofday` - [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled - [WGL] Disabled the DWM swap interval hack for Windows 8 and later (#1072) diff --git a/src/wl_monitor.c b/src/wl_monitor.c index 37712ad5..c1afd016 100644 --- a/src/wl_monitor.c +++ b/src/wl_monitor.c @@ -97,6 +97,12 @@ static void outputHandleDone(void* userData, struct wl_output* output) monitor->heightMM = (int) (mode->height * 25.4f / 96.f); } + for (int i = 0; i < _glfw.monitorCount; i++) + { + if (_glfw.monitors[i] == monitor) + return; + } + _glfwInputMonitor(monitor, GLFW_CONNECTED, _GLFW_INSERT_LAST); }