Created
November 27, 2013 12:33
-
-
Save zenoalbisser/7674930 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm | |
index 228ef9d..f64655f 100644 | |
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm | |
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm | |
@@ -522,6 +522,17 @@ void QCocoaWindow::setWindowFlags(Qt::WindowFlags flags) | |
if (!(styleMask & NSBorderlessWindowMask)) { | |
setWindowTitle(window()->title()); | |
} | |
+ | |
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 | |
+ if (QSysInfo::QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7) { | |
+ NSWindowCollectionBehavior behavior = [m_nsWindow collectionBehavior]; | |
+ if (flags & Qt::WindowFullscreenButtonHint) | |
+ behavior |= NSWindowCollectionBehaviorFullScreenPrimary; | |
+ else | |
+ behavior &= ~NSWindowCollectionBehaviorFullScreenPrimary; | |
+ [m_nsWindow setCollectionBehavior:behavior]; | |
+ } | |
+#endif | |
} | |
m_windowFlags = flags; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment