diff --git a/src/MacVim/MMCoreTextView.m b/src/MacVim/MMCoreTextView.m index ee82cc3a17..f4c0120a2f 100644 --- a/src/MacVim/MMCoreTextView.m +++ b/src/MacVim/MMCoreTextView.m @@ -734,7 +734,12 @@ - (void)setNeedsDisplayFromRow:(int)row column:(int)col toRow:(int)row2 - (void)drawRect:(NSRect)rect { NSGraphicsContext *context = [NSGraphicsContext currentContext]; +#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 CGContextRef ctx = context.CGContext; +#else + CGContextRef ctx = [context graphicsPort]; +#endif + [context setShouldAntialias:antialias]; { CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB); diff --git a/src/MacVim/MMFullScreenWindow.m b/src/MacVim/MMFullScreenWindow.m index e1973cfc7b..4c36ffe2d7 100644 --- a/src/MacVim/MMFullScreenWindow.m +++ b/src/MacVim/MMFullScreenWindow.m @@ -382,7 +382,7 @@ - (NSEdgeInsets) viewOffset { #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_12_0) // Account for newer MacBook Pro's which have a notch, which can be queried using the safe area API. - if ([NSScreen instancesRespondToSelector:@selector(safeAreaInsets)]) { + if (@available(macos 12.0, *)) { const int safeAreaBehavior = [[NSUserDefaults standardUserDefaults] integerForKey:MMNonNativeFullScreenSafeAreaBehaviorKey]; diff --git a/src/MacVim/MMWindowController.m b/src/MacVim/MMWindowController.m index 4d8e25e434..94ca435f9f 100644 --- a/src/MacVim/MMWindowController.m +++ b/src/MacVim/MMWindowController.m @@ -571,8 +571,12 @@ - (void)refreshApperanceMode // has selected as a preference. // Transparent title bar setting - decoratedWindow.titlebarAppearsTransparent = [[NSUserDefaults standardUserDefaults] - boolForKey:MMTitlebarAppearsTransparentKey]; +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10 + if (@available(macos 10.10, *)) { + decoratedWindow.titlebarAppearsTransparent = [[NSUserDefaults standardUserDefaults] + boolForKey:MMTitlebarAppearsTransparentKey]; + } +#endif // No title bar setting if ([[NSUserDefaults standardUserDefaults]