macOS: Don't wipe NSWindowStyleMaskFullSizeContentView if set manually

The NSWindow may have style masks set by the user via winId(). We don't
want to wipe those just because we're recomputing the style mask.

Fixes: QTBUG-69975
Change-Id: Ibca8388d45b623f4cdfaff4b256c4eb012e2ffac
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit d627d351bedb96c727aa6e3b7cb2cc2d678c5606)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Tor Arne Vestbø 2021-08-12 14:02:23 +02:00 committed by Qt Cherry-pick Bot
parent 9a119d8c7f
commit 39dc6106e2

View File

@ -551,9 +551,11 @@ NSUInteger QCocoaWindow::windowStyleMask(Qt::WindowFlags flags)
if (m_drawContentBorderGradient)
styleMask |= NSWindowStyleMaskTexturedBackground;
// Don't wipe fullscreen state
// Don't wipe existing states
if (m_view.window.styleMask & NSWindowStyleMaskFullScreen)
styleMask |= NSWindowStyleMaskFullScreen;
if (m_view.window.styleMask & NSWindowStyleMaskFullSizeContentView)
styleMask |= NSWindowStyleMaskFullSizeContentView;
return styleMask;
}