macOS: Enable fullscreen for windows by default

This matches the default collection behavior of NSWindows.

Change-Id: I363ed211daf6c6c2e579eb11c7294ff509d53e91
Fixes: QTBUG-63829
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Tor Arne Vestbø 2019-12-04 19:50:28 +01:00
parent c7fec68e19
commit 35da2b87e3

View File

@ -567,7 +567,10 @@ void QCocoaWindow::setWindowFlags(Qt::WindowFlags flags)
Qt::WindowType type = static_cast<Qt::WindowType>(int(flags & Qt::WindowType_Mask));
if ((type & Qt::Popup) != Qt::Popup && (type & Qt::Dialog) != Qt::Dialog) {
NSWindowCollectionBehavior behavior = m_view.window.collectionBehavior;
if ((flags & Qt::WindowFullscreenButtonHint) || m_view.window.qt_fullScreen) {
const bool enableFullScreen = m_view.window.qt_fullScreen
|| !(flags & Qt::CustomizeWindowHint)
|| (flags & Qt::WindowFullscreenButtonHint);
if (enableFullScreen) {
behavior |= NSWindowCollectionBehaviorFullScreenPrimary;
behavior &= ~NSWindowCollectionBehaviorFullScreenAuxiliary;
} else {