From a4eae00ac20d35474d9b16756e2fbc3a495831c9 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Sun, 17 Jan 2016 19:03:57 +0100 Subject: [PATCH] Make this runtime too --- ui/drivers/ui_cocoa.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/drivers/ui_cocoa.m b/ui/drivers/ui_cocoa.m index acfd9433b9..cedbc07753 100644 --- a/ui/drivers/ui_cocoa.m +++ b/ui/drivers/ui_cocoa.m @@ -162,19 +162,19 @@ static char** waiting_argv; [super dealloc]; } -#ifndef NSWindowCollectionBehaviorFullScreenPrimary -#define NSWindowCollectionBehaviorFullScreenPrimary (1 << 7) -#endif +#define NS_WINDOW_COLLECTION_BEHAVIOR_FULLSCREEN_PRIMARY (1 << 17) - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { unsigned i; SEL selector = NSSelectorFromString(BOXSTRING("setCollectionBehavior:")); + SEL fsselector = NSSelectorFromString(BOXSTRING("toggleFullScreen:")); apple_platform = self; if ([self.window respondsToSelector:selector]) { - [self.window setCollectionBehavior:[self.window collectionBehavior] | NSWindowCollectionBehaviorFullScreenPrimary]; + if ([self.window respondsToSelector:fsselector]) + [self.window setCollectionBehavior:NS_WINDOW_COLLECTION_BEHAVIOR_FULLSCREEN_PRIMARY]; } [self.window setAcceptsMouseMovedEvents: YES];