parent
4a96ce9561
commit
a1361dfa7e
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
class MacGlobalShortcutBackend;
|
class MacGlobalShortcutBackend;
|
||||||
class QObject;
|
class QObject;
|
||||||
|
class QWidget;
|
||||||
|
|
||||||
class PlatformInterface {
|
class PlatformInterface {
|
||||||
public:
|
public:
|
||||||
|
@ -28,6 +29,7 @@ QString GetApplicationSupportPath();
|
||||||
QString GetMusicDirectory();
|
QString GetMusicDirectory();
|
||||||
|
|
||||||
bool MigrateLegacyConfigFiles();
|
bool MigrateLegacyConfigFiles();
|
||||||
|
void EnableFullScreen(const QWidget& main_window);
|
||||||
|
|
||||||
} // namespace mac
|
} // namespace mac
|
||||||
|
|
||||||
|
|
|
@ -52,11 +52,13 @@
|
||||||
#import <Sparkle/SUUpdater.h>
|
#import <Sparkle/SUUpdater.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <QApplication>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
|
||||||
|
@ -472,4 +474,17 @@ void DumpDictionary(CFDictionaryRef dict) {
|
||||||
NSLog(@"%@", d);
|
NSLog(@"%@", d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NSWindowCollectionBehaviorFullScreenPrimary
|
||||||
|
static const NSUInteger kFullScreenPrimary = 1 << 7;
|
||||||
|
|
||||||
|
void EnableFullScreen(const QWidget& main_window) {
|
||||||
|
if (QSysInfo::MacintoshVersion == QSysInfo::MV_SNOWLEOPARD) {
|
||||||
|
return; // Unsupported on 10.6
|
||||||
|
}
|
||||||
|
|
||||||
|
NSView* view = reinterpret_cast<NSView*>(main_window.winId());
|
||||||
|
NSWindow* window = [view window];
|
||||||
|
[window setCollectionBehavior: kFullScreenPrimary];
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace mac
|
} // namespace mac
|
||||||
|
|
|
@ -431,6 +431,9 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
// Window
|
// Window
|
||||||
MainWindow w(&app, tray_icon.get(), &osd);
|
MainWindow w(&app, tray_icon.get(), &osd);
|
||||||
|
#ifdef Q_OS_DARWIN
|
||||||
|
mac::EnableFullScreen(w);
|
||||||
|
#endif // Q_OS_DARWIN
|
||||||
#ifdef HAVE_GIO
|
#ifdef HAVE_GIO
|
||||||
ScanGIOModulePath();
|
ScanGIOModulePath();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue