[vlc-commits] macosx: use old logic to hide menu bar if old spaces system selected im mavericks
David Fuhrmann
git at videolan.org
Sun Sep 15 21:42:14 CEST 2013
vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sun Sep 15 20:44:43 2013 +0200| [2e8f8c2f8d91cdc38837b9a197fd0dcc5880547a] | committer: David Fuhrmann
macosx: use old logic to hide menu bar if old spaces system selected im mavericks
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2e8f8c2f8d91cdc38837b9a197fd0dcc5880547a
---
modules/gui/macosx/misc.m | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/modules/gui/macosx/misc.m b/modules/gui/macosx/misc.m
index 198a2be..b871a89 100644
--- a/modules/gui/macosx/misc.m
+++ b/modules/gui/macosx/misc.m
@@ -165,10 +165,22 @@ static NSMapTable *VLCAdditions_userInfo = NULL;
static NSMutableArray *blackoutWindows = NULL;
+static bool b_old_spaces_style = YES;
+
+ (void)load
{
/* init our fake object attribute */
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
@@ -185,10 +197,10 @@ static NSMutableArray *blackoutWindows = NULL;
- (BOOL)hasMenuBar
{
- if (OSX_REDACTED)
- return YES;
- else
+ if (b_old_spaces_style)
return ([self displayID] == [[[NSScreen screens] objectAtIndex:0] displayID]);
+ else
+ return YES;
}
- (BOOL)hasDock
More information about the vlc-commits
mailing list