diff --git a/abstract_client.cpp b/abstract_client.cpp index 0ba96360e6..f86dd84389 100644 --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -1147,7 +1147,7 @@ QSize AbstractClient::sizeForClientSize(const QSize &wsize, Sizemode mode, bool { Q_UNUSED(mode) Q_UNUSED(noframe) - return wsize; + return wsize + QSize(borderLeft() + borderRight(), borderTop() + borderBottom()); } void AbstractClient::addRepaintDuringGeometryUpdates() diff --git a/autotests/integration/shell_client_test.cpp b/autotests/integration/shell_client_test.cpp index ee56f67aca..db480c3b7f 100644 --- a/autotests/integration/shell_client_test.cpp +++ b/autotests/integration/shell_client_test.cpp @@ -346,6 +346,7 @@ void TestShellClient::testFullscreen() QVERIFY(!c->isFullScreen()); QCOMPARE(c->clientSize(), QSize(100, 50)); QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); + QCOMPARE(c->sizeForClientSize(c->clientSize()), c->geometry().size()); QSignalSpy fullscreenChangedSpy(c, &ShellClient::fullScreenChanged); QVERIFY(fullscreenChangedSpy.isValid()); QSignalSpy geometryChangedSpy(c, &ShellClient::geometryChanged);