File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -734,7 +734,12 @@ - (void)setNeedsDisplayFromRow:(int)row column:(int)col toRow:(int)row2
734
734
- (void )drawRect : (NSRect )rect
735
735
{
736
736
NSGraphicsContext *context = [NSGraphicsContext currentContext ];
737
+ #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
737
738
CGContextRef ctx = context.CGContext ;
739
+ #else
740
+ CGContextRef ctx = [context graphicsPort ];
741
+ #endif
742
+
738
743
[context setShouldAntialias: antialias];
739
744
{
740
745
CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName (kCGColorSpaceSRGB );
Original file line number Diff line number Diff line change @@ -382,7 +382,7 @@ - (NSEdgeInsets) viewOffset {
382
382
383
383
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_12_0)
384
384
// Account for newer MacBook Pro's which have a notch, which can be queried using the safe area API.
385
- if ([ NSScreen instancesRespondToSelector: @selector ( safeAreaInsets )] ) {
385
+ if (@ available (macos 12.0 , *) ) {
386
386
const int safeAreaBehavior = [[NSUserDefaults standardUserDefaults ]
387
387
integerForKey: MMNonNativeFullScreenSafeAreaBehaviorKey];
388
388
Original file line number Diff line number Diff line change @@ -571,8 +571,12 @@ - (void)refreshApperanceMode
571
571
// has selected as a preference.
572
572
573
573
// Transparent title bar setting
574
- decoratedWindow.titlebarAppearsTransparent = [[NSUserDefaults standardUserDefaults ]
575
- boolForKey: MMTitlebarAppearsTransparentKey];
574
+ #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
575
+ if (@available (macos 10.10 , *)) {
576
+ decoratedWindow.titlebarAppearsTransparent = [[NSUserDefaults standardUserDefaults ]
577
+ boolForKey: MMTitlebarAppearsTransparentKey];
578
+ }
579
+ #endif
576
580
577
581
// No title bar setting
578
582
if ([[NSUserDefaults standardUserDefaults ]
You can’t perform that action at this time.
0 commit comments