wayland: Check workspace position after creating decoration
If a decoration is created for an already mapped maximized window, check the workspace position to ensure that the window still fits the maximize area. BUG: 432326
This commit is contained in:
parent
d1c5970273
commit
ab58171ed8
2 changed files with 5 additions and 3 deletions
|
@ -768,7 +768,6 @@ void TestXdgShellClient::testWindowOpensLargerThanScreen()
|
|||
QVERIFY(c);
|
||||
QVERIFY(c->isActive());
|
||||
QVERIFY(c->isDecorated());
|
||||
QEXPECT_FAIL("", "BUG 366632", Continue);
|
||||
QCOMPARE(c->frameGeometry(), QRect(QPoint(0, 0), screens()->size(0)));
|
||||
}
|
||||
|
||||
|
|
|
@ -638,7 +638,10 @@ void XdgToplevelClient::updateDecoration(bool check_workspace_pos, bool force)
|
|||
}
|
||||
updateShadow();
|
||||
if (check_workspace_pos) {
|
||||
const QRect oldGeometryRestore = geometryRestore();
|
||||
setGeometryRestore(frameGeometry());
|
||||
checkWorkspacePosition(oldFrameGeometry, -2, oldClientGeometry);
|
||||
setGeometryRestore(oldGeometryRestore);
|
||||
}
|
||||
blockGeometryUpdates(false);
|
||||
}
|
||||
|
@ -755,7 +758,7 @@ void XdgToplevelClient::handleRoleCommit()
|
|||
if (configureEvent) {
|
||||
handleStatesAcknowledged(configureEvent->states);
|
||||
}
|
||||
updateDecoration(false, false);
|
||||
updateDecoration(true, false);
|
||||
}
|
||||
|
||||
void XdgToplevelClient::doMinimize()
|
||||
|
@ -1288,7 +1291,7 @@ void XdgToplevelClient::installServerDecoration(ServerSideDecorationInterface *d
|
|||
[this] (ServerSideDecorationManagerInterface::Mode mode) {
|
||||
const bool changed = mode != m_serverDecoration->mode();
|
||||
if (changed && readyForPainting()) {
|
||||
updateDecoration(/* check_workspace_pos */ false);
|
||||
updateDecoration(/* check_workspace_pos */ true);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue