macOS: Update window flags when updating content border thickness

The titlebarAppearsTransparent property of NSWindow depends on whether
the window has a NSWindowStyleMaskTexturedBackground, so we need to
re-apply the window flags after updating the style mask to ensure we
pick up the updated value for titlebarAppearsTransparent.

Amends a1e6fed44964a3eb14045bf819d232d6cbad9f59.

Fixes: QTBUG-133525
Pick-to: 6.9
Change-Id: Ifff594f54569ac43ad27917e5f4b2f8a3bae5901
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Tor Arne Vestbø 2025-02-06 16:57:49 +01:00
parent 7dd94d74e4
commit bddc019829

View File

@ -2052,6 +2052,7 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window)
if (!m_drawContentBorderGradient) {
window.styleMask = window.styleMask & ~NSWindowStyleMaskTexturedBackground;
setWindowFlags(QPlatformWindow::window()->flags());
[window.contentView.superview setNeedsDisplay:YES];
return;
}
@ -2077,6 +2078,7 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window)
int effectiveBottomContentBorderThickness = 0;
[window setStyleMask:[window styleMask] | NSWindowStyleMaskTexturedBackground];
setWindowFlags(QPlatformWindow::window()->flags());
// Setting titlebarAppearsTransparent to YES means that the border thickness has to account
// for the title bar height as well, otherwise sheets will not be presented at the correct