Revert reversion of Tahoe fix in 7589bf4b11

It is still needed. Instead change the frame to havezero size and leaves
its origin unchanged.
This commit is contained in:
Kovid Goyal 2025-09-29 08:57:10 +05:30
parent bdae74d7ed
commit fb4a3d7f17
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 14 additions and 6 deletions

View file

@ -144,6 +144,10 @@ Detailed list of changes
- Fix a regression in the previous release that caused the incorrect tab to be
active when loading a session (:iss:`9025`)
- macOS: Workaround for bug in macOS Tahoe that caused closed OS Windows to
remain as invisible rectangles that intercept mouse events (:iss:`8952`)
0.43.0 [2025-09-28]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -215,9 +219,6 @@ Detailed list of changes
- macOS: Pass the :kbd:`Cmd+C` shortcut to the application running in the
terminal when no text is selected (:pull:`8946`)
- macOS: Workaround for bug in macOS Tahoe that caused closed OS Windows to
remain as invisible rectangles that intercept mouse events (:iss:`8952`)
- macOS: Workaround for bug in macOS Tahoe that caused OS Windows that are
fullscreen on a monitor that is disconnected while macOS is asleep to crash kitty (:iss:`8983`)

View file

@ -1929,10 +1929,11 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window, const _GLFWwndconfig* wndconf
void _glfwPlatformDestroyWindow(_GLFWwindow* window)
{
NSWindow *w = window->ns.object;
if (_glfw.ns.disabledCursorWindow == window)
_glfw.ns.disabledCursorWindow = NULL;
[window->ns.object orderOut:nil];
[w orderOut:nil];
if (window->monitor)
releaseMonitor(window);
@ -1940,7 +1941,7 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window)
if (window->context.destroy)
window->context.destroy(window);
[window->ns.object setDelegate:nil];
[w setDelegate:nil];
[window->ns.delegate cleanup];
[window->ns.delegate release];
window->ns.delegate = nil;
@ -1950,7 +1951,13 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window)
window->ns.view = nil;
[window->ns.object removeGLFWWindow];
[window->ns.object close];
// 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.
NSRect frame = w.frame; frame.size.width = 0; frame.size.height = 0;
[w setFrame:frame display:NO];
[w close]; // sends a release to NSWindow so we dont release it
window->ns.object = nil;
}