From c43f500c1677de299694019035cd0ed78a59dce0 Mon Sep 17 00:00:00 2001 From: zhaolei Date: Sun, 23 Aug 2026 20:22:25 +0800 Subject: [PATCH] Revert "macos: explicitly enable modern window corners on macOS 26" This reverts commit b16221a1d3fd62db01cdc70df647b43168495310. --- glfw/cocoa_window.m | 13 ------------- setup.py | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index cc14e5772..f0bb68ef8 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -3910,18 +3910,6 @@ 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 glfwCocoaSetWindowLevel(GLFWwindow *w, const char *level_spec) { @@ -4064,7 +4052,6 @@ glfwCocoaSetWindowChrome( if (desired_mask != current_style_mask) { [nsw setStyleMask:desired_mask]; } #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]; diff --git a/setup.py b/setup.py index e5edf75a7..ce68130df 100755 --- a/setup.py +++ b/setup.py @@ -1213,7 +1213,7 @@ def glfw_init_env( elif module == 'cocoa': ans.cppflags.append('-DGL_SILENCE_DEPRECATION') - for f_ in 'Cocoa IOKit CoreFoundation CoreVideo QuartzCore UniformTypeIdentifiers'.split(): + for f_ in 'Cocoa IOKit CoreFoundation CoreVideo UniformTypeIdentifiers'.split(): ans.ldpaths.extend(('-framework', f_)) elif module == 'wayland':