diff --git a/abstract_client.cpp b/abstract_client.cpp index edecf629a8..e07fb6e803 100644 --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -47,6 +47,14 @@ AbstractClient::AbstractClient() #endif , m_colorScheme(QStringLiteral("kdeglobals")) { + connect(this, &AbstractClient::geometryShapeChanged, this, &AbstractClient::geometryChanged); + auto signalMaximizeChanged = static_cast(&AbstractClient::clientMaximizedStateChanged); + connect(this, signalMaximizeChanged, this, &AbstractClient::geometryChanged); + connect(this, &AbstractClient::clientStepUserMovedResized, this, &AbstractClient::geometryChanged); + connect(this, &AbstractClient::clientStartUserMovedResized, this, &AbstractClient::moveResizedChanged); + connect(this, &AbstractClient::clientFinishUserMovedResized, this, &AbstractClient::moveResizedChanged); + connect(this, &AbstractClient::clientStartUserMovedResized, this, &AbstractClient::removeCheckScreenConnection); + connect(this, &AbstractClient::clientFinishUserMovedResized, this, &AbstractClient::setupCheckScreenConnection); } AbstractClient::~AbstractClient() diff --git a/autotests/wayland/move_resize_window_test.cpp b/autotests/wayland/move_resize_window_test.cpp index b0d4c487da..f0baaded51 100644 --- a/autotests/wayland/move_resize_window_test.cpp +++ b/autotests/wayland/move_resize_window_test.cpp @@ -188,7 +188,6 @@ void MoveResizeWindowTest::testMove() workspace()->slotWindowMove(); QCOMPARE(workspace()->getMovingClient(), c); QCOMPARE(startMoveResizedSpy.count(), 1); - QEXPECT_FAIL("", "Connect is in Client", Continue); QCOMPARE(moveResizedChangedSpy.count(), 1); QCOMPARE(c->isMove(), true); QCOMPARE(c->geometryRestore(), QRect(0, 0, 100, 50)); @@ -218,6 +217,7 @@ void MoveResizeWindowTest::testMove() QCOMPARE(clientFinishUserMovedResizedSpy.count(), 0); c->keyPressEvent(Qt::Key_Enter); QCOMPARE(clientFinishUserMovedResizedSpy.count(), 1); + QCOMPARE(moveResizedChangedSpy.count(), 2); QCOMPARE(c->geometry(), QRect(16, 32, 100, 50)); QCOMPARE(c->isMove(), false); QVERIFY(workspace()->getMovingClient() == nullptr); diff --git a/client.cpp b/client.cpp index 9694d983cf..ee1f37cc46 100644 --- a/client.cpp +++ b/client.cpp @@ -155,14 +155,6 @@ Client::Client() client_size = QSize(100, 100); ready_for_painting = false; // wait for first damage or sync reply - connect(this, &Client::geometryShapeChanged, this, &Client::geometryChanged); - auto signalMaximizeChanged = static_cast(&Client::clientMaximizedStateChanged); - connect(this, signalMaximizeChanged, this, &Client::geometryChanged); - connect(this, &Client::clientStepUserMovedResized, this, &Client::geometryChanged); - connect(this, &Client::clientStartUserMovedResized, this, &Client::moveResizedChanged); - connect(this, &Client::clientFinishUserMovedResized, this, &Client::moveResizedChanged); - connect(this, &Client::clientStartUserMovedResized, this, &Client::removeCheckScreenConnection); - connect(this, &Client::clientFinishUserMovedResized, this, &Client::setupCheckScreenConnection); connect(this, &Client::paletteChanged, this, &Client::triggerDecorationRepaint); connect(clientMachine(), &ClientMachine::localhostChanged, this, &Client::updateCaption);