Revert "Workaround for latest Apple regression in Tahoe"

This reverts commit d837a64e36.

Commit 24b31d96e9 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.
This commit is contained in:
Ethan Wu 2025-09-22 16:50:31 -07:00
parent 14a429c5bd
commit 7589bf4b11

View file

@ -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;
}