1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-01 03:40:16 +02:00

Try harder for compile-on-sl run-fullscreen-on-lion

This commit is contained in:
Leo Franchi
2011-10-20 14:43:15 -04:00
parent 428dbe8f0e
commit 4e8c99554a

View File

@@ -232,6 +232,12 @@ void Tomahawk::checkForUpdates() {
#endif #endif
} }
#ifdef LION
#define SET_LION_FULLSCREEN NSWindowCollectionBehaviorFullScreenPrimary
#else
#define SET_LION_FULLSCREEN (NSUInteger)(1 << 7) // Defined as NSWindowCollectionBehaviorFullScreenPrimary in lion's NSWindow.h
#endif
void Tomahawk::enableFullscreen() void Tomahawk::enableFullscreen()
{ {
// We don't support anything below leopard, so if it's not [snow] leopard it must be lion // We don't support anything below leopard, so if it's not [snow] leopard it must be lion
@@ -249,7 +255,7 @@ void Tomahawk::enableFullscreen()
{ {
NSView *nsview = (NSView *)w->winId(); NSView *nsview = (NSView *)w->winId();
NSWindow *nswindow = [nsview window]; NSWindow *nswindow = [nsview window];
[nswindow setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; [nswindow setCollectionBehavior:SET_LION_FULLSCREEN];
} }
} }
} }