Merge branch 'fix/mac-os-window-cycle' of https://github.com/owenmead/kitty

This commit is contained in:
Kovid Goyal 2026-04-22 07:28:36 +05:30
commit 77f2fef6a7
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -4088,6 +4088,9 @@ GLFWAPI void glfwCocoaSetWindowChrome(GLFWwindow *w, unsigned int color, bool us
) [filteredWindows addObject:window];
}
if (filteredWindows.count < 2) return;
[filteredWindows sortUsingComparator:^NSComparisonResult(NSWindow *a, NSWindow *b) {
return [@(a.windowNumber) compare:@(b.windowNumber)];
}];
NSWindow *keyWindow = [NSApp keyWindow];
NSUInteger index = [filteredWindows indexOfObject:keyWindow];
NSUInteger nextIndex = 0;