diff --git a/autotests/integration/move_resize_window_test.cpp b/autotests/integration/move_resize_window_test.cpp index 16ac32915a..54fbbf0bfb 100644 --- a/autotests/integration/move_resize_window_test.cpp +++ b/autotests/integration/move_resize_window_test.cpp @@ -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); } diff --git a/src/internal_client.cpp b/src/internal_client.cpp index d432f77975..35237fffef 100644 --- a/src/internal_client.cpp +++ b/src/internal_client.cpp @@ -346,6 +346,7 @@ void InternalClient::destroyClient() markAsZombie(); if (isMoveResize()) { leaveMoveResize(); + emit clientFinishUserMovedResized(this); } Deleted *deleted = Deleted::create(this); diff --git a/src/xdgshellclient.cpp b/src/xdgshellclient.cpp index 323e43cbc9..ac2db6afdb 100644 --- a/src/xdgshellclient.cpp +++ b/src/xdgshellclient.cpp @@ -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);