Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/lockscreen.cpp
Show First 20 Lines • Show All 559 Lines • ▼ Show 20 Line(s) | 559 | { | |||
---|---|---|---|---|---|
560 | using namespace KWayland::Client; | 560 | using namespace KWayland::Client; | ||
561 | AbstractClient *c = showWindow(); | 561 | AbstractClient *c = showWindow(); | ||
562 | QVERIFY(c); | 562 | QVERIFY(c); | ||
563 | QSignalSpy clientStepUserMovedResizedSpy(c, &AbstractClient::clientStepUserMovedResized); | 563 | QSignalSpy clientStepUserMovedResizedSpy(c, &AbstractClient::clientStepUserMovedResized); | ||
564 | QVERIFY(clientStepUserMovedResizedSpy.isValid()); | 564 | QVERIFY(clientStepUserMovedResizedSpy.isValid()); | ||
565 | quint32 timestamp = 1; | 565 | quint32 timestamp = 1; | ||
566 | 566 | | |||
567 | workspace()->slotWindowMove(); | 567 | workspace()->slotWindowMove(); | ||
568 | QCOMPARE(workspace()->getMovingClient(), c); | 568 | QCOMPARE(workspace()->moveResizeClient(), c); | ||
569 | QVERIFY(c->isMove()); | 569 | QVERIFY(c->isMove()); | ||
570 | kwinApp()->platform()->keyboardKeyPressed(KEY_RIGHT, timestamp++); | 570 | kwinApp()->platform()->keyboardKeyPressed(KEY_RIGHT, timestamp++); | ||
571 | kwinApp()->platform()->keyboardKeyReleased(KEY_RIGHT, timestamp++); | 571 | kwinApp()->platform()->keyboardKeyReleased(KEY_RIGHT, timestamp++); | ||
572 | QEXPECT_FAIL("", "First event is ignored", Continue); | 572 | QEXPECT_FAIL("", "First event is ignored", Continue); | ||
573 | QCOMPARE(clientStepUserMovedResizedSpy.count(), 1); | 573 | QCOMPARE(clientStepUserMovedResizedSpy.count(), 1); | ||
574 | 574 | | |||
575 | // TODO adjust once the expected fail is fixed | 575 | // TODO adjust once the expected fail is fixed | ||
576 | kwinApp()->platform()->keyboardKeyPressed(KEY_RIGHT, timestamp++); | 576 | kwinApp()->platform()->keyboardKeyPressed(KEY_RIGHT, timestamp++); | ||
577 | kwinApp()->platform()->keyboardKeyReleased(KEY_RIGHT, timestamp++); | 577 | kwinApp()->platform()->keyboardKeyReleased(KEY_RIGHT, timestamp++); | ||
578 | QCOMPARE(clientStepUserMovedResizedSpy.count(), 1); | 578 | QCOMPARE(clientStepUserMovedResizedSpy.count(), 1); | ||
579 | 579 | | |||
580 | // while locking our window should continue to be in move resize | 580 | // while locking our window should continue to be in move resize | ||
581 | LOCK | 581 | LOCK | ||
582 | QCOMPARE(workspace()->getMovingClient(), c); | 582 | QCOMPARE(workspace()->moveResizeClient(), c); | ||
583 | QVERIFY(c->isMove()); | 583 | QVERIFY(c->isMove()); | ||
584 | kwinApp()->platform()->keyboardKeyPressed(KEY_RIGHT, timestamp++); | 584 | kwinApp()->platform()->keyboardKeyPressed(KEY_RIGHT, timestamp++); | ||
585 | kwinApp()->platform()->keyboardKeyReleased(KEY_RIGHT, timestamp++); | 585 | kwinApp()->platform()->keyboardKeyReleased(KEY_RIGHT, timestamp++); | ||
586 | QCOMPARE(clientStepUserMovedResizedSpy.count(), 1); | 586 | QCOMPARE(clientStepUserMovedResizedSpy.count(), 1); | ||
587 | 587 | | |||
588 | UNLOCK | 588 | UNLOCK | ||
589 | QCOMPARE(workspace()->getMovingClient(), c); | 589 | QCOMPARE(workspace()->moveResizeClient(), c); | ||
590 | QVERIFY(c->isMove()); | 590 | QVERIFY(c->isMove()); | ||
591 | kwinApp()->platform()->keyboardKeyPressed(KEY_RIGHT, timestamp++); | 591 | kwinApp()->platform()->keyboardKeyPressed(KEY_RIGHT, timestamp++); | ||
592 | kwinApp()->platform()->keyboardKeyReleased(KEY_RIGHT, timestamp++); | 592 | kwinApp()->platform()->keyboardKeyReleased(KEY_RIGHT, timestamp++); | ||
593 | QCOMPARE(clientStepUserMovedResizedSpy.count(), 2); | 593 | QCOMPARE(clientStepUserMovedResizedSpy.count(), 2); | ||
594 | kwinApp()->platform()->keyboardKeyPressed(KEY_ESC, timestamp++); | 594 | kwinApp()->platform()->keyboardKeyPressed(KEY_ESC, timestamp++); | ||
595 | kwinApp()->platform()->keyboardKeyReleased(KEY_ESC, timestamp++); | 595 | kwinApp()->platform()->keyboardKeyReleased(KEY_ESC, timestamp++); | ||
596 | QVERIFY(!c->isMove()); | 596 | QVERIFY(!c->isMove()); | ||
597 | } | 597 | } | ||
▲ Show 20 Lines • Show All 173 Lines • Show Last 20 Lines |