Skip to content

Commit

Permalink
Fix: Alt-Tab not working in borderless fullscreen (#3865) (#4655)
Browse files Browse the repository at this point in the history
  • Loading branch information
veins1 authored Jan 3, 2025
1 parent 0f6e85a commit 97fa3a7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/platforms/rcore_desktop_glfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit 97fa3a7

Please sign in to comment.