wasm: Render Qt::SubWindow borderless
Windows with Qt::SubWindow flag should not have platform decoration. Fixes: QTBUG-115054 Pick-to: 6.5 6.6 Change-Id: I7111df6057a087080194c1d46e350df839bec437 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This commit is contained in:
parent
959a8b3967
commit
0493504f34
@ -411,10 +411,10 @@ void QWasmWindow::setWindowFlags(Qt::WindowFlags flags)
|
||||
onPositionPreferenceChanged(positionPreferenceFromWindowFlags(flags));
|
||||
}
|
||||
m_flags = flags;
|
||||
dom::syncCSSClassWith(m_qtWindow, "frameless", !hasFrame());
|
||||
dom::syncCSSClassWith(m_qtWindow, "has-border", hasBorder());
|
||||
dom::syncCSSClassWith(m_qtWindow, "has-shadow", hasShadow());
|
||||
dom::syncCSSClassWith(m_qtWindow, "has-title", flags.testFlag(Qt::WindowTitleHint));
|
||||
dom::syncCSSClassWith(m_qtWindow, "frameless", flags.testFlag(Qt::FramelessWindowHint));
|
||||
dom::syncCSSClassWith(m_qtWindow, "has-title", hasTitleBar());
|
||||
dom::syncCSSClassWith(m_qtWindow, "transparent-for-input",
|
||||
flags.testFlag(Qt::WindowTransparentForInput));
|
||||
|
||||
@ -603,16 +603,25 @@ void QWasmWindow::requestUpdate()
|
||||
m_compositor->requestUpdateWindow(this, QWasmCompositor::UpdateRequestDelivery);
|
||||
}
|
||||
|
||||
bool QWasmWindow::hasFrame() const
|
||||
{
|
||||
return !m_flags.testFlag(Qt::FramelessWindowHint);
|
||||
}
|
||||
|
||||
bool QWasmWindow::hasBorder() const
|
||||
{
|
||||
return !m_state.testFlag(Qt::WindowFullScreen) && !m_flags.testFlag(Qt::FramelessWindowHint)
|
||||
return hasFrame() && !m_state.testFlag(Qt::WindowFullScreen) && !m_flags.testFlag(Qt::SubWindow)
|
||||
&& !windowIsPopupType(m_flags);
|
||||
}
|
||||
|
||||
bool QWasmWindow::hasTitleBar() const
|
||||
{
|
||||
return hasBorder() && m_flags.testFlag(Qt::WindowTitleHint);
|
||||
}
|
||||
|
||||
bool QWasmWindow::hasShadow() const
|
||||
{
|
||||
return !m_flags.testFlag(Qt::NoDropShadowWindowHint)
|
||||
&& !m_flags.testFlag(Qt::FramelessWindowHint);
|
||||
return hasBorder() && !m_flags.testFlag(Qt::NoDropShadowWindowHint);
|
||||
}
|
||||
|
||||
bool QWasmWindow::hasMaximizeButton() const
|
||||
|
@ -117,6 +117,8 @@ private:
|
||||
QWasmWindowStack::PositionPreference positionPreference) final;
|
||||
|
||||
void invalidate();
|
||||
bool hasFrame() const;
|
||||
bool hasTitleBar() const;
|
||||
bool hasBorder() const;
|
||||
bool hasShadow() const;
|
||||
bool hasMaximizeButton() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user