Skip to content

Commit

Permalink
macOS: Enable fullscreen for windows by default
Browse files Browse the repository at this point in the history
This matches the default collection behavior of NSWindows.

Change-Id: I363ed211daf6c6c2e579eb11c7294ff509d53e91
Fixes: QTBUG-63829
Reviewed-by: Timur Pocheptsov <[email protected]>
  • Loading branch information
torarnv committed Dec 5, 2019
1 parent c7fec68 commit 35da2b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/plugins/platforms/cocoa/qcocoawindow.mm
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,10 @@ static void qRegisterNotificationCallbacks()
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 {
Expand Down

0 comments on commit 35da2b8

Please sign in to comment.