Skip to content

Commit 21fa5bb

Browse files
committed
macOS: focusing of minimized window broken
This was done to fix #8913 in d7c2cdc. Explicitly de-miniaturize before making key.
1 parent 1e0b3f8 commit 21fa5bb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

glfw/cocoa_window.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2291,8 +2291,13 @@ int _glfwPlatformWindowBell(_GLFWwindow* window UNUSED)
22912291

22922292
void _glfwPlatformFocusWindow(_GLFWwindow* window)
22932293
{
2294-
// Make us the active application
2294+
if (_glfwPlatformWindowIconified(window)) {
2295+
// miniaturized windows return false in canBecomeKeyWindow therefore
2296+
// unminiaturize first
2297+
[window->ns.object deminiaturize:nil];
2298+
}
22952299
if ([window->ns.object canBecomeKeyWindow]) {
2300+
// Make us the active application
22962301
[NSApp activateIgnoringOtherApps:YES];
22972302
[window->ns.object makeKeyAndOrderFront:nil];
22982303
}

0 commit comments

Comments
 (0)