diff --git a/docs/changelog.rst b/docs/changelog.rst index 994926b07..427f6d2d7 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/glfw.c b/kitty/glfw.c index 54556a95b..2432fe5dd 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -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