Since d7c2cdc closing an OS Window on macOS was causing minimized window to be restored.

Fixes #8913
This commit is contained in:
Kovid Goyal
2025-11-25 15:38:12 +05:30
parent 3d92a52676
commit 9e918547e8
2 changed files with 4 additions and 4 deletions

View File

@@ -171,6 +171,8 @@ Detailed list of changes
- When expanding environment variables in :opt:`listen_on` allow the :opt:`env`
directive to take effect
- macOS: Fix closing an OS Window when another OS Window is minimized causing
the minimized window to be un-minimized (:iss:`8913`)
0.44.0 [2025-11-03]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -1587,16 +1587,14 @@ cocoa_focus_last_window(id_type source_window_id, size_t *source_workspaces, siz
OSWindow *w = global_state.os_windows + i;
if (
w->id != source_window_id && w->handle && w->shown_once &&
w->last_focused_counter >= highest_focus_number &&
w->last_focused_counter >= highest_focus_number && !glfwGetWindowAttrib(w->handle, GLFW_ICONIFIED) &&
(!source_workspace_count || window_in_same_cocoa_workspace(glfwGetCocoaWindow(w->handle), source_workspaces, source_workspace_count))
) {
highest_focus_number = w->last_focused_counter;
window_to_focus = w;
}
}
if (window_to_focus) {
glfwFocusWindow(window_to_focus->handle);
}
if (window_to_focus) glfwFocusWindow(window_to_focus->handle);
}
#endif