mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-06 09:15:57 +02:00
Merge branch 'macos26-explicit-window-corners' of https://github.com/zzhaolei/kitty
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user