summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoawindow.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-08-12 14:02:23 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-17 12:39:43 +0000
commit39dc6106e2bc1e96ed1105f2c79f327d80e703a8 (patch)
tree241bf37c7659b6f3908866e8d2bb9ce45381a680 /src/plugins/platforms/cocoa/qcocoawindow.mm
parent9a119d8c7f8520e318297edbad116eb291eb1c07 (diff)
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>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoawindow.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 7270e7c23c..6e7fc5cdbb 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -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;
}