MacOS Tahoe rounded corner fix

21 Feb 2026 20:26 | macOS

I couldn’t cope with those corners anymore. This requires disabling SIP but it makes the corners like Sequoia system-wide. I don’t like to disable SIP but those corners hurt my eyes too much. Enough is enough. This uses DYLD injection to patch the NSThemeFrame methods that determine the corner radius.

https://github.com/m4rkw/macos-corner-fix

Screenshot

Screenshot

Code

#import <AppKit/AppKit.h>
#import <objc/runtime.h>

static CGFloat kDesiredCornerRadius = 10.0;  // Sequoia (macOS 15) default

static double swizzled_cornerRadius(id self, SEL _cmd) {
    return kDesiredCornerRadius;
}

static double swizzled_getCachedCornerRadius(id self, SEL _cmd) {
    return kDesiredCornerRadius;
}

static CGSize swizzled_topCornerSize(id self, SEL _cmd) {
    return CGSizeMake(kDesiredCornerRadius, kDesiredCornerRadius);
}

static CGSize swizzled_bottomCornerSize(id self, SEL _cmd) {
    return CGSizeMake(kDesiredCornerRadius, kDesiredCornerRadius);
}

__attribute__((constructor))
static void init(void) {
    Class cls = NSClassFromString(@"NSThemeFrame");
    if (!cls) return;

    Method m1 = class_getInstanceMethod(cls, @selector(_cornerRadius));
    if (m1) method_setImplementation(m1, (IMP)swizzled_cornerRadius);

    Method m2 = class_getInstanceMethod(cls, @selector(_getCachedWindowCornerRadius));
    if (m2) method_setImplementation(m2, (IMP)swizzled_getCachedCornerRadius);

    Method m3 = class_getInstanceMethod(cls, @selector(_topCornerSize));
    if (m3) method_setImplementation(m3, (IMP)swizzled_topCornerSize);

    Method m4 = class_getInstanceMethod(cls, @selector(_bottomCornerSize));
    if (m4) method_setImplementation(m4, (IMP)swizzled_bottomCornerSize);

    NSLog(@"[CornerTweak] Swizzled NSThemeFrame corner radius to %.1f", kDesiredCornerRadius);
}

Installation

  1. Compile
clang -arch arm64e -dynamiclib -framework AppKit \
  -o SafariCornerTweak.dylib \
  SafariCornerTweak.m
  1. Sign
codesign -f -s - SafariCornerTweak.dylib
  1. Install
sudo cp SafariCornerTweak.dylib /usr/local/lib/

Launch an app with the fix

DYLD_INSERT_LIBRARIES=/usr/local/lib/SafariCornerTweak.dylib \
    /Applications/Safari/MacOS/Contents/Safari

Install globally (all apps)

Warning: This injects the dylib into every app in your session. The tweak only modifies NSThemeFrame so it should be harmless, but if any app crashes on launch, remove the env var immediately with launchctl unsetenv.

  1. Install the launch agent:
cp com.local.dyld-inject.plist ~/Library/LaunchAgents/com.local.dyld-inject.plist
  1. Activate it
launchctl load ~/Library/LaunchAgents/com.local.dyld-inject.plist

Uninstall

launchctl unload ~/Library/LaunchAgents/com.local.dyld-inject.plist
rm -f /usr/local/lib/SafariCornerTweak.dylib