Move geometry related connects from Client to AbstractClient
This commit is contained in:
parent
4e7521fe64
commit
5d4cd0b26c
3 changed files with 9 additions and 9 deletions
|
@ -47,6 +47,14 @@ AbstractClient::AbstractClient()
|
|||
#endif
|
||||
, m_colorScheme(QStringLiteral("kdeglobals"))
|
||||
{
|
||||
connect(this, &AbstractClient::geometryShapeChanged, this, &AbstractClient::geometryChanged);
|
||||
auto signalMaximizeChanged = static_cast<void (AbstractClient::*)(KWin::AbstractClient*, MaximizeMode)>(&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()
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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<void (Client::*)(KWin::AbstractClient*, MaximizeMode)>(&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);
|
||||
|
|
Loading…
Reference in a new issue