mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 01:08:10 +02:00
macOS: Fix closing an OS Window when another OS Window is minimized causing the minimized window to be un-minimized
This is a bug we inherited from GLFW. Fixes #8913
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user