From bc83ee48db334962a3a13670e0ed84d4656c5238 Mon Sep 17 00:00:00 2001 From: maradh251 Date: Mon, 6 Jul 2026 03:20:55 +0200 Subject: [PATCH] Fix MaximizeWindow() not resizing the screen --- src/platforms/rcore_desktop_glfw.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/platforms/rcore_desktop_glfw.c b/src/platforms/rcore_desktop_glfw.c index 64596b376..a4e478670 100644 --- a/src/platforms/rcore_desktop_glfw.c +++ b/src/platforms/rcore_desktop_glfw.c @@ -334,11 +334,12 @@ void ToggleBorderlessWindowed(void) // Set window state: maximized, if resizable void MaximizeWindow(void) { - if (glfwGetWindowAttrib(platform.handle, GLFW_RESIZABLE) == GLFW_TRUE) + if (glfwGetWindowAttrib(platform.handle, GLFW_RESIZABLE) != GLFW_TRUE) { - glfwMaximizeWindow(platform.handle); - FLAG_SET(CORE.Window.flags, FLAG_WINDOW_MAXIMIZED); + glfwSetWindowAttrib(platform.handle, GLFW_RESIZABLE, GLFW_TRUE); } + glfwMaximizeWindow(platform.handle); + FLAG_SET(CORE.Window.flags, FLAG_WINDOW_MAXIMIZED); } // Set window state: minimized @@ -2169,12 +2170,12 @@ static void MouseScrollCallback(GLFWwindow *window, double xoffset, double yoffs // GLFW3: Cursor ennter callback, when cursor enters the window static void CursorEnterCallback(GLFWwindow *window, int entered) { - if (entered) + if (entered) { // NOTE: Mouse position updated by MouseCursorPosCallback() CORE.Input.Mouse.cursorOnScreen = true; } - else + else { CORE.Input.Mouse.cursorOnScreen = false; CORE.Input.Mouse.currentPosition = (Vector2){ 0 };