From d3ac94e2b7788797444d32b6e7a3796f385bd757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 12 Aug 2021 14:02:23 +0200 Subject: [PATCH] macOS: Don't wipe NSWindowStyleMaskFullSizeContentView if set manually MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit d627d351bedb96c727aa6e3b7cb2cc2d678c5606) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/platforms/cocoa/qcocoawindow.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 7270e7c23c3..6e7fc5cdbba 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; }