[vlc-commits] always hide menu bar for fullscreen on osx redacted (fixes #9040)
David Fuhrmann
git at videolan.org
Sun Jul 28 22:14:46 CEST 2013
vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sun Jul 28 20:03:31 2013 +0200| [4ebe98116b867af109d051c376b266653b224923] | committer: David Fuhrmann
always hide menu bar for fullscreen on osx redacted (fixes #9040)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4ebe98116b867af109d051c376b266653b224923
---
modules/gui/macosx/CompatibilityFixes.h | 3 ++-
modules/gui/macosx/intf.m | 4 ++--
modules/gui/macosx/misc.m | 5 ++++-
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/modules/gui/macosx/CompatibilityFixes.h b/modules/gui/macosx/CompatibilityFixes.h
index b424754..61d49ed 100644
--- a/modules/gui/macosx/CompatibilityFixes.h
+++ b/modules/gui/macosx/CompatibilityFixes.h
@@ -27,7 +27,8 @@
#pragma OS detection code
#define OSX_SNOW_LEOPARD (NSAppKitVersionNumber < 1115 && NSAppKitVersionNumber >= 1038)
#define OSX_LION (NSAppKitVersionNumber < 1162 && NSAppKitVersionNumber >= 1115.2)
-#define OSX_MOUNTAIN_LION NSAppKitVersionNumber >= 1162
+#define OSX_MOUNTAIN_LION (NSAppKitVersionNumber < 1244 && NSAppKitVersionNumber >= 1162)
+#define OSX_REDACTED NSAppKitVersionNumber >= 1244
#pragma mark -
#pragma Fixes for OS X Snow Leopard (10.6)
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 41f6480..5f03e02 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1511,7 +1511,7 @@ static VLCMain *_o_sharedMainInstance = nil;
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 */
- if ((NSAppKitVersionNumber >= 1115.2 && NSAppKitVersionNumber < 1138.45) || OSX_MOUNTAIN_LION || OSX_SNOW_LEOPARD) {
+ if ((NSAppKitVersionNumber >= 1115.2 && NSAppKitVersionNumber < 1138.45) || OSX_MOUNTAIN_LION || OSX_REDACTED || OSX_SNOW_LEOPARD) {
CFStringRef reasonForActivity = CFStringCreateWithCString(kCFAllocatorDefault, _("VLC media playback"), kCFStringEncodingUTF8);
if ([self activeVideoPlayback])
success = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, reasonForActivity, &systemSleepAssertionID);
@@ -1778,7 +1778,7 @@ static VLCMain *_o_sharedMainInstance = nil;
- (NSString *)latestCrashLogPathPreviouslySeen:(BOOL)previouslySeen
{
NSString * crashReporter;
- if (OSX_MOUNTAIN_LION)
+ if (OSX_MOUNTAIN_LION || OSX_REDACTED)
crashReporter = [@"~/Library/Logs/DiagnosticReports" stringByExpandingTildeInPath];
else
crashReporter = [@"~/Library/Logs/CrashReporter" stringByExpandingTildeInPath];
diff --git a/modules/gui/macosx/misc.m b/modules/gui/macosx/misc.m
index 678c917..932bdc4 100644
--- a/modules/gui/macosx/misc.m
+++ b/modules/gui/macosx/misc.m
@@ -185,7 +185,10 @@ static NSMutableArray *blackoutWindows = NULL;
- (BOOL)hasMenuBar
{
- return ([self displayID] == [[[NSScreen screens] objectAtIndex:0] displayID]);
+ if (OSX_REDACTED)
+ return YES;
+ else
+ return ([self displayID] == [[[NSScreen screens] objectAtIndex:0] displayID]);
}
- (BOOL)hasDock
More information about the vlc-commits
mailing list