Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/struts_test.cpp
Show First 20 Lines • Show All 937 Lines • ▼ Show 20 Line(s) | 848 | { | |||
---|---|---|---|---|---|
938 | QVERIFY(client2 != client); | 938 | QVERIFY(client2 != client); | ||
939 | QVERIFY(client2->isDecorated()); | 939 | QVERIFY(client2->isDecorated()); | ||
940 | QCOMPARE(client2->clientSize(), QSize(200, 300)); | 940 | QCOMPARE(client2->clientSize(), QSize(200, 300)); | ||
941 | QCOMPARE(client2->pos(), QPoint(1500, 400)); | 941 | QCOMPARE(client2->pos(), QPoint(1500, 400)); | ||
942 | 942 | | |||
943 | const QRect origGeo = client2->geometry(); | 943 | const QRect origGeo = client2->geometry(); | ||
944 | Cursor::setPos(origGeo.center()); | 944 | Cursor::setPos(origGeo.center()); | ||
945 | workspace()->performWindowOperation(client2, Options::MoveOp); | 945 | workspace()->performWindowOperation(client2, Options::MoveOp); | ||
946 | QTRY_COMPARE(workspace()->getMovingClient(), client2); | 946 | QTRY_COMPARE(workspace()->moveResizeClient(), client2); | ||
947 | QVERIFY(client2->isMove()); | 947 | QVERIFY(client2->isMove()); | ||
948 | // move to next screen - step is 8 pixel, so 800 pixel | 948 | // move to next screen - step is 8 pixel, so 800 pixel | ||
949 | for (int i = 0; i < 100; i++) { | 949 | for (int i = 0; i < 100; i++) { | ||
950 | client2->keyPressEvent(Qt::Key_Left); | 950 | client2->keyPressEvent(Qt::Key_Left); | ||
951 | QTest::qWait(50); | 951 | QTest::qWait(50); | ||
952 | } | 952 | } | ||
953 | client2->keyPressEvent(Qt::Key_Enter); | 953 | client2->keyPressEvent(Qt::Key_Enter); | ||
954 | QCOMPARE(client2->isMove(), false); | 954 | QCOMPARE(client2->isMove(), false); | ||
955 | QVERIFY(workspace()->getMovingClient() == nullptr); | 955 | QVERIFY(workspace()->moveResizeClient() == nullptr); | ||
956 | QCOMPARE(client2->geometry(), QRect(origGeo.translated(-800, 0))); | 956 | QCOMPARE(client2->geometry(), QRect(origGeo.translated(-800, 0))); | ||
957 | } | 957 | } | ||
958 | 958 | | |||
959 | } | 959 | } | ||
960 | 960 | | |||
961 | WAYLANDTEST_MAIN(KWin::StrutsTest) | 961 | WAYLANDTEST_MAIN(KWin::StrutsTest) | ||
962 | #include "struts_test.moc" | 962 | #include "struts_test.moc" |