wayland: Signal about finished move/resize in destroyClient()

We need to emit the clientFinishUserMovedResized signal to notify
effects such as translucency that the interactive move-resize is
finished. Otherwise, the set() animation won't be cancelled and the
window will get stuck frozen.

BUG: 409376
This commit is contained in:
Vlad Zahorodnii 2021-05-14 08:32:49 +03:00
parent b2548fe0a9
commit 4ba249eee5
3 changed files with 5 additions and 3 deletions

View file

@ -1055,7 +1055,7 @@ void MoveResizeWindowTest::testDestroyMoveClient()
shellSurface.reset();
surface.reset();
QVERIFY(Test::waitForWindowDestroyed(client));
QCOMPARE(clientFinishUserMovedResizedSpy.count(), 0);
QCOMPARE(clientFinishUserMovedResizedSpy.count(), 1);
QCOMPARE(workspace()->moveResizeClient(), nullptr);
}
@ -1092,7 +1092,7 @@ void MoveResizeWindowTest::testDestroyResizeClient()
shellSurface.reset();
surface.reset();
QVERIFY(Test::waitForWindowDestroyed(client));
QCOMPARE(clientFinishUserMovedResizedSpy.count(), 0);
QCOMPARE(clientFinishUserMovedResizedSpy.count(), 1);
QCOMPARE(workspace()->moveResizeClient(), nullptr);
}

View file

@ -346,6 +346,7 @@ void InternalClient::destroyClient()
markAsZombie();
if (isMoveResize()) {
leaveMoveResize();
emit clientFinishUserMovedResized(this);
}
Deleted *deleted = Deleted::create(this);

View file

@ -319,10 +319,11 @@ QRect XdgSurfaceClient::frameRectToBufferRect(const QRect &rect) const
void XdgSurfaceClient::destroyClient()
{
markAsZombie();
m_configureTimer->stop();
if (isMoveResize()) {
leaveMoveResize();
emit clientFinishUserMovedResized(this);
}
m_configureTimer->stop();
cleanTabBox();
Deleted *deleted = Deleted::create(this);
emit windowClosed(this, deleted);