Block geometry updates on move resize finish and don't configure xdg shell surfaces while blocked
Summary: We send out too many configure requests when finishing move resize which also triggers quick tiling. This change addresses the problem of the too many configure requests by making the configure method check whether geometry updates are blocked. And to make this work properly for the end of finish move resize the complete method is wrapped in a geometry update blocker. BUG: 388072 FIXED-IN: 5.12.1 Test Plan: Quick tiling test passes, both Wayland and X11 windows are quick tiled correctly. Reviewers: #kwin, #plasma, jgrulich Subscribers: plasma-devel, kwin Tags: #plasma Differential Revision: https://phabricator.kde.org/D10156
This commit is contained in:
parent
e22d9d957b
commit
aefa11f11a
4 changed files with 7 additions and 3 deletions
|
@ -470,7 +470,7 @@ void QuickTilingTest::testQuickTilingPointerMoveXdgShell()
|
|||
QCOMPARE(c->quickTileMode(), QuickTileMode(QuickTileFlag::None));
|
||||
QCOMPARE(c->maximizeMode(), MaximizeRestore);
|
||||
QVERIFY(configureRequestedSpy.wait());
|
||||
QCOMPARE(configureRequestedSpy.count(), 2);
|
||||
QTRY_COMPARE(configureRequestedSpy.count(), 2);
|
||||
|
||||
QSignalSpy quickTileChangedSpy(c, &AbstractClient::quickTileModeChanged);
|
||||
QVERIFY(quickTileChangedSpy.isValid());
|
||||
|
@ -492,9 +492,7 @@ void QuickTilingTest::testQuickTilingPointerMoveXdgShell()
|
|||
QCOMPARE(quickTileChangedSpy.count(), 1);
|
||||
QTEST(c->quickTileMode(), "expectedMode");
|
||||
QVERIFY(configureRequestedSpy.wait());
|
||||
QEXPECT_FAIL("", "BUG 388072", Continue);
|
||||
QCOMPARE(configureRequestedSpy.count(), 4);
|
||||
QEXPECT_FAIL("", "BUG 388072", Continue);
|
||||
QCOMPARE(false, configureRequestedSpy.last().first().toSize().isEmpty());
|
||||
}
|
||||
|
||||
|
|
|
@ -2745,6 +2745,7 @@ bool Client::doStartMoveResize()
|
|||
|
||||
void AbstractClient::finishMoveResize(bool cancel)
|
||||
{
|
||||
GeometryUpdatesBlocker blocker(this);
|
||||
const bool wasResize = isResize(); // store across leaveMoveResize
|
||||
leaveMoveResize();
|
||||
|
||||
|
|
|
@ -293,6 +293,9 @@ void ShellClient::init()
|
|||
if (m_closing) {
|
||||
return;
|
||||
}
|
||||
if (m_requestGeometryBlockCounter != 0 || areGeometryUpdatesBlocked()) {
|
||||
return;
|
||||
}
|
||||
m_xdgShellSurface->configure(xdgSurfaceStates());
|
||||
};
|
||||
configure();
|
||||
|
|
|
@ -245,6 +245,8 @@ private:
|
|||
if (m_client->m_requestGeometryBlockCounter == 0) {
|
||||
if (m_client->m_blockedRequestGeometry.isValid()) {
|
||||
m_client->requestGeometry(m_client->m_blockedRequestGeometry);
|
||||
} else if (m_client->m_xdgShellSurface) {
|
||||
m_client->m_xdgShellSurface->configure(m_client->xdgSurfaceStates());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue