From 7e2177464fce7bd2bb2a09d57bd9a44f6746bd2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 4 May 2018 18:26:52 +0200 Subject: macOS: Allow moving out of fullscreen state using titlebar button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/cocoa/qcocoawindow.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins') 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 { -- cgit v1.2.3