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.
This commit is contained in:
Austin W Smith 2026-05-26 00:08:02 -07:00
parent 0f8c40a206
commit d5b7665583

View File

@ -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);