From e6db07c4e7cca41a94dd787d9a4938abab7918ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 4 Jul 2024 22:57:42 +0200 Subject: [PATCH] wasm: Re-evaluate window flags when reparenting window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We apply CSS classes to the qt-window in setWindowFlags based on whether it hasFrame(), hasBorder(), etc. Which in turn depends on whether the window is a top level or child window. As a QPlatformWindow may be created while a QWindow is top level, and then reparented into another QPlatformWindow, we need to update the window flags, and re-sync the CSS classes, as otherwise we end up with child windows with shadows and tile bars. Pick-to: 6.8 Change-Id: Ibbb3d2230a880057053d7b12f93257d9b250aa6f Reviewed-by: Lorn Potter Reviewed-by: Piotr WierciƄski --- src/plugins/platforms/wasm/qwasmwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/platforms/wasm/qwasmwindow.cpp b/src/plugins/platforms/wasm/qwasmwindow.cpp index eb6b1cd2e3c..a9be3909599 100644 --- a/src/plugins/platforms/wasm/qwasmwindow.cpp +++ b/src/plugins/platforms/wasm/qwasmwindow.cpp @@ -761,6 +761,10 @@ void QWasmWindow::setMask(const QRegion ®ion) void QWasmWindow::setParent(const QPlatformWindow *) { + // The window flags depend on whether we are a + // child window or not, so update them here. + setWindowFlags(window()->flags()); + commitParent(parentNode()); }