Skip to content

Commit 25bd032

Browse files
committed
Workaround for latest Apple regression in Tahoe
Now NSWindow::close no longer actually closes the window. Sigh. Have to also set its frame to zero size, otherwise an invisible rect remains that intercepts mouse events and takes up space in Mission Control. Life is too short for this shit. Fixes #8592
1 parent b7c4f42 commit 25bd032

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/changelog.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ Detailed list of changes
171171
- macOS: Pass the :kbd:`Cmd+C` shortcut to the application running in the
172172
terminal when no text is selected (:pull:`8946`)
173173

174+
- macOS: Workaround for bug in macOS Tahoe that caused closed OS Windows to
175+
remain as invisible rectangles that intercept mouse events (:iss:`8952`)
176+
174177
0.42.2 [2025-07-16]
175178
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
176179

glfw/cocoa_window.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1927,7 +1927,12 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window)
19271927
window->ns.view = nil;
19281928

19291929
[window->ns.object removeGLFWWindow];
1930-
[window->ns.object close];
1930+
// Workaround for macOS Tahoe where if the frame is not set to zero size
1931+
// even after NSWindow::close the window remains on screen as an invisible
1932+
// rectangle that intercepts mouse events and takes up space in mission
1933+
// control. Sigh.
1934+
[window->ns.object setFrame:NSMakeRect(0, 0, 0, 0) display:NO];
1935+
[window->ns.object close]; // sends a release to the NSWindow so we dont release it here
19311936
window->ns.object = nil;
19321937
}
19331938

0 commit comments

Comments
 (0)