Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use correct availability macros

  • Loading branch information...
commit 37741a0cb5f63a0fd10c64dd6e61e6f6ccd00296 1 parent 88b7b92
@b4winckler authored
View
2  src/MacVim/MMAppController.m
@@ -241,7 +241,7 @@ - (id)init
{
if (!(self = [super init])) return nil;
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7)
+#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
// Disable automatic relaunching
[NSApp disableRelaunchOnLogin];
#endif
View
12 src/MacVim/MMVimController.m
@@ -766,21 +766,21 @@ - (void)handleMessage:(int)msgid data:(NSData *)data
[self setServerName:name];
[name release];
} else if (EnterFullscreenMsgID == msgid) {
-#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7)
+#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
+ [[windowController window] toggleFullScreen:self];
+#else
const void *bytes = [data bytes];
int fuoptions = *((int*)bytes); bytes += sizeof(int);
int bg = *((int*)bytes);
NSColor *back = [NSColor colorWithArgbInt:bg];
[windowController enterFullscreen:fuoptions backgroundColor:back];
-#else
- [[windowController window] toggleFullScreen:self];
#endif
} else if (LeaveFullscreenMsgID == msgid) {
-#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7)
- [windowController leaveFullscreen];
-#else
+#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
[[windowController window] toggleFullScreen:self];
+#else
+ [windowController leaveFullscreen];
#endif
} else if (SetBuffersModifiedMsgID == msgid) {
const void *bytes = [data bytes];
View
2  src/MacVim/MMWindowController.m
@@ -181,7 +181,7 @@ - (id)initWithVimController:(MMVimController *)controller
if ([win respondsToSelector:@selector(_setContentHasShadow:)])
[win _setContentHasShadow:NO];
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7)
+#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
[win setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
#endif
Please sign in to comment.
Something went wrong with that request. Please try again.