wasm: Re-evaluate window flags when reparenting window
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. Change-Id: Ibbb3d2230a880057053d7b12f93257d9b250aa6f Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> (cherry picked from commit e6db07c4e7cca41a94dd787d9a4938abab7918ac) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>bb10
parent
2b50551923
commit
7017dc6d37
|
|
@ -742,6 +742,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());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue