Commit e7d53f08 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii Committed by Nate Graham
Browse files

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
(cherry picked from commit ab58171e)
parent 5a57eeaf
......@@ -765,7 +765,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)));
}
......
......@@ -639,7 +639,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);
}
......@@ -756,7 +759,7 @@ void XdgToplevelClient::handleRoleCommit()
if (configureEvent) {
handleStatesAcknowledged(configureEvent->states);
}
updateDecoration(false, false);
updateDecoration(true, false);
}
void XdgToplevelClient::doMinimize()
......@@ -1292,7 +1295,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);
}
}
);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment