wasm: don't make normal-state windows StaysOnBottom
Setting StaysOnBottom creates a special case where the first window is always kept at the bottom of the window stack. However this becomes confusing if the first window is not maximized or fullscreen, since it's then not possible to bring it to front by clicking the title bar. Add a check on the window state, and set WindowStaysOnBottomHint for maximized or fullscreen windows only. Pick-to: 6.8 Change-Id: I0f43874cfcdc7c951c47cd278f5acdd42368cd5a Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This commit is contained in:
parent
4b32420243
commit
1d612c5100
@ -266,9 +266,13 @@ void QWasmScreen::onSubtreeChanged(QWasmWindowTreeNodeChangeType changeType,
|
||||
QWasmWindowTreeNode *parent, QWasmWindow *child)
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
|
||||
QWindow *window = child->window();
|
||||
const bool isMaxFull = (window->windowState() & Qt::WindowMaximized) ||
|
||||
(window->windowState() & Qt::WindowFullScreen);
|
||||
if (changeType == QWasmWindowTreeNodeChangeType::NodeInsertion && parent == this
|
||||
&& childStack().size() == 1) {
|
||||
child->window()->setFlag(Qt::WindowStaysOnBottomHint);
|
||||
&& childStack().size() == 1 && isMaxFull) {
|
||||
window->setFlag(Qt::WindowStaysOnBottomHint);
|
||||
}
|
||||
QWasmWindowTreeNode::onSubtreeChanged(changeType, parent, child);
|
||||
m_compositor->onWindowTreeChanged(changeType, child);
|
||||
|
Loading…
x
Reference in New Issue
Block a user