macOS: focusing of minimized window broken

This was done to fix #8913 in d7c2cdc.
Explicitly de-miniaturize before making key.
This commit is contained in:
Kovid Goyal
2025-08-23 07:32:33 +05:30
parent 1e0b3f808f
commit 21fa5bb1ce

View File

@@ -2291,8 +2291,13 @@ int _glfwPlatformWindowBell(_GLFWwindow* window UNUSED)
void _glfwPlatformFocusWindow(_GLFWwindow* window)
{
// Make us the active application
if (_glfwPlatformWindowIconified(window)) {
// miniaturized windows return false in canBecomeKeyWindow therefore
// unminiaturize first
[window->ns.object deminiaturize:nil];
}
if ([window->ns.object canBecomeKeyWindow]) {
// Make us the active application
[NSApp activateIgnoringOtherApps:YES];
[window->ns.object makeKeyAndOrderFront:nil];
}