summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qnamespace.h3
-rw-r--r--src/corelib/global/qnamespace.qdoc2
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm9
3 files changed, 8 insertions, 6 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 6430c85936..d071bd2abd 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -311,7 +311,8 @@ public:
BypassGraphicsProxyWidget = 0x20000000,
WindowOkButtonHint = 0x00080000,
WindowCancelButtonHint = 0x00100000,
- NoDropShadowWindowHint = 0x40000000
+ NoDropShadowWindowHint = 0x40000000,
+ WindowFullscreenButtonHint = 0x80000000
};
Q_DECLARE_FLAGS(WindowFlags, WindowType)
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 66442a83c7..903e17c095 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -1991,6 +1991,8 @@
\value MacWindowToolBarButtonHint On Mac OS X adds a tool bar button (i.e.,
the oblong button that is on the top right of windows that have toolbars).
+ \value WindowFullscreenButtonHint On Mac OS X adds a fullscreen button.
+
\value BypassGraphicsProxyWidget Prevents the window and its children from
automatically embedding themselves into a QGraphicsProxyWidget if the
parent widget is already embedded. You can set this flag if you
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 321c0ead4c..e011d1c86f 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -684,11 +684,10 @@ NSWindow * QCocoaWindow::createNSWindow()
setWindowShadow(flags);
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
- if (QSysInfo::QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7) {
- // All windows with the WindowMaximizeButtonHint set also get a full-screen button.
- if (flags & Qt::WindowMaximizeButtonHint)
- [window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
- }
+ if (QSysInfo::QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7) {
+ if (flags & Qt::WindowFullscreenButtonHint)
+ [window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
+ }
#endif
createdWindow = window;