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>bb10
parent
ccfb309b90
commit
7e2177464f
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue