Merge branch 'macos26-explicit-window-corners' of https://github.com/zzhaolei/kitty

This commit is contained in:
Kovid Goyal
2026-04-18 22:37:08 +05:30
2 changed files with 14 additions and 1 deletions

View File

@@ -3918,6 +3918,18 @@ apply_titlebar_color_settings(_GLFWwindow *window) {
#undef tc
}
static void
apply_window_corner_curve(_GLFWwindow *window) {
if (!window || !window->decorated) return;
if (@available(macOS 26.0, *)) {
GLFWWindow *nsw = window->ns.object;
NSView *frame_view = nsw.contentView.superview;
CALayer *layer = frame_view.layer;
if (!layer) return;
layer.cornerCurve = kCACornerCurveContinuous;
}
}
GLFWAPI void glfwCocoaSetWindowChrome(GLFWwindow *w, unsigned int color, bool use_system_color, unsigned int system_color, int background_blur, unsigned int hide_window_decorations, bool show_text_in_titlebar, int color_space, float background_opacity, bool resizable) { @autoreleasepool {
@@ -4033,6 +4045,7 @@ GLFWAPI void glfwCocoaSetWindowChrome(GLFWwindow *w, unsigned int color, bool us
}
#undef tc
apply_titlebar_color_settings(window);
apply_window_corner_curve(window);
// HACK: Changing the style mask can cause the first responder to be cleared
[nsw makeFirstResponder:window->ns.view];

View File

@@ -175,7 +175,7 @@ def init_env(
elif module == 'cocoa':
ans.cppflags.append('-DGL_SILENCE_DEPRECATION')
for f_ in 'Cocoa IOKit CoreFoundation CoreVideo UniformTypeIdentifiers'.split():
for f_ in 'Cocoa IOKit CoreFoundation CoreVideo QuartzCore UniformTypeIdentifiers'.split():
ans.ldpaths.extend(('-framework', f_))
elif module == 'wayland':