From 7589bf4b119bb67d2bb271ca73ca7a4313db63d7 Mon Sep 17 00:00:00 2001 From: Ethan Wu Date: Mon, 22 Sep 2025 16:50:31 -0700 Subject: [PATCH] Revert "Workaround for latest Apple regression in Tahoe" This reverts commit d837a64e36019e80ad027282822dc0acacf44bbb. Commit 24b31d96e9a065eab578b7d8280f811a19768f65 fixes the original problem of "ghost windows" that d837a64 was trying to solve. (I have no idea how or why it does.) One side-effect of the workaround from d837a64 is that it causes closed windows to be moved to the (0,0) before being destroyed. This means that when creating new windows, they are placed on the left-most display, instead of the display in which the previously closed window was on as you would expect. Reverting this kludge fixes this bug. --- glfw/cocoa_window.m | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index b597953f2..044d5161a 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -1950,12 +1950,7 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window) window->ns.view = nil; [window->ns.object removeGLFWWindow]; - // Workaround for macOS Tahoe where if the frame is not set to zero size - // even after NSWindow::close the window remains on screen as an invisible - // rectangle that intercepts mouse events and takes up space in mission - // control. Sigh. - [window->ns.object setFrame:NSMakeRect(0, 0, 0, 0) display:NO]; - [window->ns.object close]; // sends a release to the NSWindow so we dont release it here + [window->ns.object close]; window->ns.object = nil; }