Commit 2e8f8c2f authored by David Fuhrmann's avatar David Fuhrmann

macosx: use old logic to hide menu bar if old spaces system selected im mavericks

parent 03c69b44
...@@ -165,10 +165,22 @@ static NSMapTable *VLCAdditions_userInfo = NULL; ...@@ -165,10 +165,22 @@ static NSMapTable *VLCAdditions_userInfo = NULL;
static NSMutableArray *blackoutWindows = NULL; static NSMutableArray *blackoutWindows = NULL;
static bool b_old_spaces_style = YES;
+ (void)load + (void)load
{ {
/* init our fake object attribute */ /* init our fake object attribute */
blackoutWindows = [[NSMutableArray alloc] initWithCapacity:1]; blackoutWindows = [[NSMutableArray alloc] initWithCapacity:1];
if (OSX_REDACTED) {
NSUserDefaults *userDefaults = [[NSUserDefaults alloc] init];
[userDefaults addSuiteNamed:@"com.apple.spaces"];
/* this is system settings -> mission control -> monitors using different spaces */
NSNumber *o_span_displays = [userDefaults objectForKey:@"spans-displays"];
b_old_spaces_style = [o_span_displays boolValue];
[userDefaults release];
}
} }
+ (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID + (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID
...@@ -185,10 +197,10 @@ static NSMutableArray *blackoutWindows = NULL; ...@@ -185,10 +197,10 @@ static NSMutableArray *blackoutWindows = NULL;
- (BOOL)hasMenuBar - (BOOL)hasMenuBar
{ {
if (OSX_REDACTED) if (b_old_spaces_style)
return YES;
else
return ([self displayID] == [[[NSScreen screens] objectAtIndex:0] displayID]); return ([self displayID] == [[[NSScreen screens] objectAtIndex:0] displayID]);
else
return YES;
} }
- (BOOL)hasDock - (BOOL)hasDock
......
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