diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2012-11-05 22:20:47 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-23 00:47:48 +0100 |
commit | dc2fd227abe2508f2c8329623c4342800a107147 (patch) | |
tree | 8adae3057c29d18578c6bb4034d883be022d8497 /src/plugins/platforms | |
parent | a7647939f1c9dca4410be6866ed8c51912cb5173 (diff) |
Add WindowFullscreenButtonHint.
Adds the fullscreen button on Mac OS X. Has no effect
on other platforms. Regarding the name I dropped the
"Mac" prefix (like MacWindowToolBarButtonHint). Other
platforms can use and we don't want to accumulate "Mac"
API's.
Change logic in QCocoaWindow check for this flag instead
of using WindowsMaximizebutton.
Change-Id: I9f2db75e8e71b3da36777c7e48852eda3ce9d534
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 9 |
1 files changed, 4 insertions, 5 deletions
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; |