Commit 7b1cd368 authored by David Fuhrmann's avatar David Fuhrmann

macosx: add yosemite guard

(cherry picked from commit 2c674d76924785536fef66929b7ddcb08dde585b)
Signed-off-by: default avatarDavid Fuhrmann <dfuhrmann@videolan.org>
parent b3f316e8
...@@ -28,7 +28,9 @@ ...@@ -28,7 +28,9 @@
#define OSX_SNOW_LEOPARD (NSAppKitVersionNumber < 1115 && NSAppKitVersionNumber >= 1038) #define OSX_SNOW_LEOPARD (NSAppKitVersionNumber < 1115 && NSAppKitVersionNumber >= 1038)
#define OSX_LION (NSAppKitVersionNumber < 1162 && NSAppKitVersionNumber >= 1115.2) #define OSX_LION (NSAppKitVersionNumber < 1162 && NSAppKitVersionNumber >= 1115.2)
#define OSX_MOUNTAIN_LION (NSAppKitVersionNumber < 1244 && NSAppKitVersionNumber >= 1162) #define OSX_MOUNTAIN_LION (NSAppKitVersionNumber < 1244 && NSAppKitVersionNumber >= 1162)
#define OSX_MAVERICKS NSAppKitVersionNumber >= 1244 #define OSX_MAVERICKS (NSAppKitVersionNumber < 1334 && NSAppKitVersionNumber >= 1244)
#define OSX_YOSEMITE NSAppKitVersionNumber >= 1334
#pragma mark - #pragma mark -
#pragma Fixes for OS X Snow Leopard (10.6) #pragma Fixes for OS X Snow Leopard (10.6)
......
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
BOOL b_inFullscreen = [self fullscreen] || ([self respondsToSelector:@selector(inFullscreenTransition)] && [(VLCVideoWindowCommon *)self inFullscreenTransition]); BOOL b_inFullscreen = [self fullscreen] || ([self respondsToSelector:@selector(inFullscreenTransition)] && [(VLCVideoWindowCommon *)self inFullscreenTransition]);
if(OSX_MAVERICKS && b_inFullscreen && constrainedRect.size.width == screenRect.size.width if((OSX_MAVERICKS || OSX_YOSEMITE) && b_inFullscreen && constrainedRect.size.width == screenRect.size.width
&& constrainedRect.size.height != screenRect.size.height && constrainedRect.size.height != screenRect.size.height
&& abs(screenRect.size.height - constrainedRect.size.height) <= 25.) { && abs(screenRect.size.height - constrainedRect.size.height) <= 25.) {
......
...@@ -1488,7 +1488,7 @@ static bool f_appExit = false; ...@@ -1488,7 +1488,7 @@ static bool f_appExit = false;
IOReturn success; IOReturn success;
/* work-around a bug in 10.7.4 and 10.7.5, so check for 10.7.x < 10.7.4, 10.8 and 10.6 */ /* work-around a bug in 10.7.4 and 10.7.5, so check for 10.7.x < 10.7.4, 10.8 and 10.6 */
if ((NSAppKitVersionNumber >= 1115.2 && NSAppKitVersionNumber < 1138.45) || OSX_MOUNTAIN_LION || OSX_MAVERICKS || OSX_SNOW_LEOPARD) { if ((NSAppKitVersionNumber >= 1115.2 && NSAppKitVersionNumber < 1138.45) || OSX_MOUNTAIN_LION || OSX_MAVERICKS || OSX_YOSEMITE || OSX_SNOW_LEOPARD) {
CFStringRef reasonForActivity = CFStringCreateWithCString(kCFAllocatorDefault, _("VLC media playback"), kCFStringEncodingUTF8); CFStringRef reasonForActivity = CFStringCreateWithCString(kCFAllocatorDefault, _("VLC media playback"), kCFStringEncodingUTF8);
if ([self activeVideoPlayback]) if ([self activeVideoPlayback])
success = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, reasonForActivity, &systemSleepAssertionID); success = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, reasonForActivity, &systemSleepAssertionID);
......
...@@ -173,7 +173,7 @@ static bool b_old_spaces_style = YES; ...@@ -173,7 +173,7 @@ static bool b_old_spaces_style = YES;
/* init our fake object attribute */ /* init our fake object attribute */
blackoutWindows = [[NSMutableArray alloc] initWithCapacity:1]; blackoutWindows = [[NSMutableArray alloc] initWithCapacity:1];
if (OSX_MAVERICKS) { if (OSX_MAVERICKS || OSX_YOSEMITE) {
NSUserDefaults *userDefaults = [[NSUserDefaults alloc] init]; NSUserDefaults *userDefaults = [[NSUserDefaults alloc] init];
[userDefaults addSuiteNamed:@"com.apple.spaces"]; [userDefaults addSuiteNamed:@"com.apple.spaces"];
/* this is system settings -> mission control -> monitors using different spaces */ /* this is system settings -> mission control -> monitors using different spaces */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment