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
Pick-to: 6.2 6.1 5.15
Change-Id: Ibca8388d45b623f4cdfaff4b256c4eb012e2ffac
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
bb10
Tor Arne Vestbø 2021-08-12 14:02:23 +02:00
parent bb04478dfc
commit d627d351be
1 changed files with 3 additions and 1 deletions

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;
}