From 97fa3a73e82416fa7542dd50e8e96dd20a71d980 Mon Sep 17 00:00:00 2001 From: veins1 <19636663+veins1@users.noreply.github.com> Date: Fri, 3 Jan 2025 21:36:48 +0500 Subject: [PATCH] Fix: Alt-Tab not working in borderless fullscreen (#3865) (#4655) --- src/platforms/rcore_desktop_glfw.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/platforms/rcore_desktop_glfw.c b/src/platforms/rcore_desktop_glfw.c index bd2600c872ab..0076ccb0d923 100644 --- a/src/platforms/rcore_desktop_glfw.c +++ b/src/platforms/rcore_desktop_glfw.c @@ -223,11 +223,9 @@ void ToggleBorderlessWindowed(void) if (!wasOnFullscreen) CORE.Window.previousPosition = CORE.Window.position; CORE.Window.previousScreen = CORE.Window.screen; - // Set undecorated and topmost modes and flags + // Set undecorated flag glfwSetWindowAttrib(platform.handle, GLFW_DECORATED, GLFW_FALSE); CORE.Window.flags |= FLAG_WINDOW_UNDECORATED; - glfwSetWindowAttrib(platform.handle, GLFW_FLOATING, GLFW_TRUE); - CORE.Window.flags |= FLAG_WINDOW_TOPMOST; // Get monitor position and size int monitorPosX = 0; @@ -247,9 +245,7 @@ void ToggleBorderlessWindowed(void) } else { - // Remove topmost and undecorated modes and flags - glfwSetWindowAttrib(platform.handle, GLFW_FLOATING, GLFW_FALSE); - CORE.Window.flags &= ~FLAG_WINDOW_TOPMOST; + // Remove undecorated flag glfwSetWindowAttrib(platform.handle, GLFW_DECORATED, GLFW_TRUE); CORE.Window.flags &= ~FLAG_WINDOW_UNDECORATED;