From 0f8c40a2064ab3c42447e831e507db76f3c3fdd5 Mon Sep 17 00:00:00 2001 From: Austin W Smith Date: Thu, 14 May 2026 05:07:27 -0700 Subject: [PATCH 1/2] Fix borderless fullscreen always on top Don't pass a monitor to glfwSetWindowMonitor(). This avoids setting the flag which keeps the window always on top. --- src/platforms/rcore_desktop_glfw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/rcore_desktop_glfw.c b/src/platforms/rcore_desktop_glfw.c index b1e100cf4..9d1fe6b1d 100644 --- a/src/platforms/rcore_desktop_glfw.c +++ b/src/platforms/rcore_desktop_glfw.c @@ -287,7 +287,7 @@ void ToggleBorderlessWindowed(void) CORE.Window.screen.height = mode->height; // Set screen position and size - glfwSetWindowMonitor(platform.handle, monitors[monitor], CORE.Window.position.x, CORE.Window.position.y, + glfwSetWindowMonitor(platform.handle, NULL, CORE.Window.position.x, CORE.Window.position.y, CORE.Window.screen.width, CORE.Window.screen.height, mode->refreshRate); // Refocus window From d5b766558380439048704b2234cb5c58ad759313 Mon Sep 17 00:00:00 2001 From: Austin W Smith Date: Tue, 26 May 2026 00:08:02 -0700 Subject: [PATCH 2/2] Update for borderless-windowed always on top bug Only apply the fix for Windows OS, since that seems to be the only platform with the issue. --- src/platforms/rcore_desktop_glfw.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/platforms/rcore_desktop_glfw.c b/src/platforms/rcore_desktop_glfw.c index 9d1fe6b1d..e6a598ff6 100644 --- a/src/platforms/rcore_desktop_glfw.c +++ b/src/platforms/rcore_desktop_glfw.c @@ -287,8 +287,14 @@ void ToggleBorderlessWindowed(void) CORE.Window.screen.height = mode->height; // Set screen position and size + #if defined(_WIN32) + // NOTE: To prevent the fullscreen window from always staying on top, don't pass a monitor at this point. glfwSetWindowMonitor(platform.handle, NULL, CORE.Window.position.x, CORE.Window.position.y, CORE.Window.screen.width, CORE.Window.screen.height, mode->refreshRate); + #else + glfwSetWindowMonitor(platform.handle, monitors[monitor], CORE.Window.position.x, CORE.Window.position.y, + CORE.Window.screen.width, CORE.Window.screen.height, mode->refreshRate); + #endif // Refocus window glfwFocusWindow(platform.handle);