diff --git a/docs/changelog.rst b/docs/changelog.rst index 9b025c8c6..908b711a9 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -145,6 +145,9 @@ Detailed list of changes it was last active on, after full screening some application causes the quick access terminal to appear on the old space (:iss:`8740`) +- macOS: Fix closing an OS Window when another OS Window is minimized causing + the minimized window to be un-minimized (:iss:`8913`) + - Allow using backspace to move the cursor onto the previous line in cooked mode. This is indicated by the `bw` property in kitty's terminfo (:iss:`8841`) - Watchers: A new event for global watchers corresponding to the tab bar being changed (:disc:`8842`) diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index e32092800..93f500cb6 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -1667,7 +1667,8 @@ handle_screen_size_change(_GLFWwindow *window, NSNotification *notification UNUS - (BOOL)canBecomeKeyWindow { - if (glfw_window && glfw_window->ns.layer_shell.is_active) { + if (!glfw_window) return NO; + if (glfw_window->ns.layer_shell.is_active) { if (glfw_window->ns.layer_shell.config.type == GLFW_LAYER_SHELL_BACKGROUND) return NO; switch(glfw_window->ns.layer_shell.config.focus_policy) { case GLFW_FOCUS_NOT_ALLOWED: return NO; @@ -1676,7 +1677,8 @@ handle_screen_size_change(_GLFWwindow *window, NSNotification *notification UNUS } } // Required for NSWindowStyleMaskBorderless windows - return YES; + // Also miniaturized windows should not become key + return !_glfwPlatformWindowIconified(glfw_window); } - (BOOL)canBecomeMainWindow