1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-05 21:57:41 +02:00

Fix stupid regression in sizegrip hiding when fullscreening

This commit is contained in:
Leo Franchi
2012-06-08 14:19:08 +02:00
parent 224b46f5b0
commit 59ab945f0b

View File

@@ -253,10 +253,12 @@ void Tomahawk::checkForUpdates() {
#ifdef LION #ifdef LION
#define SET_LION_FULLSCREEN NSWindowCollectionBehaviorFullScreenPrimary #define SET_LION_FULLSCREEN NSWindowCollectionBehaviorFullScreenPrimary
#define LION_FULLSCREEN_NOTIFICATION_VALUE NSWindowWillEnterFullScreenNotification #define LION_FULLSCREEN_ENTER_NOTIFICATION_VALUE NSWindowWillEnterFullScreenNotification
#define LION_FULLSCREEN_EXIT_NOTIFICATION_VALUE NSWindowDidExitFullScreenNotification
#else #else
#define SET_LION_FULLSCREEN (NSUInteger)(1 << 7) // Defined as NSWindowCollectionBehaviorFullScreenPrimary in lion's NSWindow.h #define SET_LION_FULLSCREEN (NSUInteger)(1 << 7) // Defined as NSWindowCollectionBehaviorFullScreenPrimary in lion's NSWindow.h
#define LION_FULLSCREEN_NOTIFICATION_VALUE @"NSWindowWillEnterFullScreenNotification" #define LION_FULLSCREEN_ENTER_NOTIFICATION_VALUE @"NSWindowWillEnterFullScreenNotification"
#define LION_FULLSCREEN_EXIT_NOTIFICATION_VALUE @"NSWindowDidExitFullScreenNotification"
#endif #endif
void Tomahawk::enableFullscreen( QObject* receiver ) void Tomahawk::enableFullscreen( QObject* receiver )
@@ -281,14 +283,14 @@ void Tomahawk::enableFullscreen( QObject* receiver )
if ( !receiver ) if ( !receiver )
continue; continue;
[[NSNotificationCenter defaultCenter] addObserverForName:LION_FULLSCREEN_NOTIFICATION_VALUE [[NSNotificationCenter defaultCenter] addObserverForName:LION_FULLSCREEN_ENTER_NOTIFICATION_VALUE
object:nswindow object:nswindow
queue:nil queue:nil
usingBlock:^(NSNotification * note) { usingBlock:^(NSNotification * note) {
NSLog(@"Became Full Screen!"); NSLog(@"Became Full Screen!");
QMetaObject::invokeMethod( receiver, "fullScreenEntered", Qt::DirectConnection ); QMetaObject::invokeMethod( receiver, "fullScreenEntered", Qt::DirectConnection );
}]; }];
[[NSNotificationCenter defaultCenter] addObserverForName:LION_FULLSCREEN_NOTIFICATION_VALUE [[NSNotificationCenter defaultCenter] addObserverForName:LION_FULLSCREEN_EXIT_NOTIFICATION_VALUE
object:nswindow object:nswindow
queue:nil queue:nil
usingBlock:^(NSNotification * note) { usingBlock:^(NSNotification * note) {