summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-05-04 18:26:52 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-05-30 23:12:32 +0000
commit7e2177464fce7bd2bb2a09d57bd9a44f6746bd2b (patch)
tree84dd0d6147a810d46277c665959e2ca1af37bad2
parentccfb309b908339d45339f7db084bc6f653757de9 (diff)
macOS: Allow moving out of fullscreen state using titlebar button
Even if the window isn't configured with Qt::WindowFullscreenButtonHint, the user might call showFullScreen(), which we respect and move the window into fullscreen. In this state, we need to keep the collection behavior as NSWindowCollectionBehaviorFullScreenPrimary, otherwise the zoom button will have no effect and the user can't move out of fullscreen. Change-Id: I77a4b4ee4b42fabc4c6ed2f529ff57acc31d6c24 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 1e311ed388..72f3bc0075 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -573,7 +573,7 @@ void QCocoaWindow::setWindowFlags(Qt::WindowFlags flags)
Qt::WindowType type = window()->type();
if ((type & Qt::Popup) != Qt::Popup && (type & Qt::Dialog) != Qt::Dialog) {
NSWindowCollectionBehavior behavior = m_view.window.collectionBehavior;
- if (flags & Qt::WindowFullscreenButtonHint) {
+ if ((flags & Qt::WindowFullscreenButtonHint) || m_view.window.qt_fullScreen) {
behavior |= NSWindowCollectionBehaviorFullScreenPrimary;
behavior &= ~NSWindowCollectionBehaviorFullScreenAuxiliary;
} else {