Fix AbstractClient::sizeForClientSize
Summary: The method is supposed to return the AbstractClient's size for a given client size. That is the size including the window decoration. The default implementation returned the passed in client size without adjusting for the decoration. This resulted in ShellClient getting a wrong size especially when AbstractClient::adjustedClientSize (which calls sizeForClientSize) was called. The result of the incorrect size was for example a shrinking of the window when starting to resize a window. BUG: 370345 FIXED-IN: 5.8.4 Reviewers: #kwin, #plasma_on_wayland, broulik, subdiff Subscribers: plasma-devel, kwin Tags: #plasma_on_wayland, #kwin Differential Revision: https://phabricator.kde.org/D3414
This commit is contained in:
parent
fb69b791a1
commit
16c7650d76
2 changed files with 2 additions and 1 deletions
|
@ -1146,7 +1146,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()
|
||||
|
|
|
@ -334,6 +334,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);
|
||||
|
|
Loading…
Reference in a new issue