[rcore][GLFW] Fix borderless-windowed mode being always on top (#5868)
* 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. * 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:
parent
1129d42b48
commit
47c8e897ce
1 changed files with 6 additions and 0 deletions
|
|
@ -287,8 +287,14 @@ void ToggleBorderlessWindowed(void)
|
||||||
CORE.Window.screen.height = mode->height;
|
CORE.Window.screen.height = mode->height;
|
||||||
|
|
||||||
// Set screen position and size
|
// 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,
|
glfwSetWindowMonitor(platform.handle, monitors[monitor], CORE.Window.position.x, CORE.Window.position.y,
|
||||||
CORE.Window.screen.width, CORE.Window.screen.height, mode->refreshRate);
|
CORE.Window.screen.width, CORE.Window.screen.height, mode->refreshRate);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Refocus window
|
// Refocus window
|
||||||
glfwFocusWindow(platform.handle);
|
glfwFocusWindow(platform.handle);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue