Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/shell_client_test.cpp
Show First 20 Lines • Show All 655 Lines • ▼ Show 20 Line(s) | 604 | { | |||
---|---|---|---|---|---|
656 | if (wlShellSurface) { | 656 | if (wlShellSurface) { | ||
657 | wlShellSurface->setMaximized(); | 657 | wlShellSurface->setMaximized(); | ||
658 | } | 658 | } | ||
659 | if (xdgShellSurface) { | 659 | if (xdgShellSurface) { | ||
660 | xdgShellSurface->setMaximized(true); | 660 | xdgShellSurface->setMaximized(true); | ||
661 | } | 661 | } | ||
662 | QVERIFY(sizeChangeRequestedSpy.wait()); | 662 | QVERIFY(sizeChangeRequestedSpy.wait()); | ||
663 | QCOMPARE(sizeChangeRequestedSpy.count(), 1); | 663 | QCOMPARE(sizeChangeRequestedSpy.count(), 1); | ||
664 | | ||||
665 | if (xdgShellSurface) { | ||||
666 | for (const auto &it: configureRequestedSpy) { | ||||
667 | xdgShellSurface->ackConfigure(it[2].toInt()); | ||||
668 | } | ||||
669 | } | ||||
670 | Test::render(surface.data(), sizeChangeRequestedSpy.last().first().toSize(), Qt::red); | ||||
671 | QVERIFY(geometryChangedSpy.wait()); | ||||
672 | | ||||
664 | QCOMPARE(c->maximizeMode(), MaximizeFull); | 673 | QCOMPARE(c->maximizeMode(), MaximizeFull); | ||
665 | QCOMPARE(geometryChangedSpy.isEmpty(), false); | 674 | QCOMPARE(geometryChangedSpy.isEmpty(), false); | ||
666 | geometryChangedSpy.clear(); | 675 | geometryChangedSpy.clear(); | ||
667 | 676 | | |||
668 | // fullscreen the window | 677 | // fullscreen the window | ||
669 | if (wlShellSurface) { | 678 | if (wlShellSurface) { | ||
670 | wlShellSurface->setFullscreen(); | 679 | wlShellSurface->setFullscreen(); | ||
671 | } | 680 | } | ||
672 | if (xdgShellSurface) { | 681 | if (xdgShellSurface) { | ||
673 | xdgShellSurface->setFullscreen(true); | 682 | xdgShellSurface->setFullscreen(true); | ||
674 | } | 683 | } | ||
675 | QVERIFY(fullscreenChangedSpy.wait()); | 684 | QVERIFY(fullscreenChangedSpy.wait()); | ||
676 | if (decoMode == ServerSideDecoration::Mode::Server) { | 685 | if (decoMode == ServerSideDecoration::Mode::Server) { | ||
677 | QVERIFY(sizeChangeRequestedSpy.wait()); | 686 | QVERIFY(sizeChangeRequestedSpy.wait()); | ||
678 | QCOMPARE(sizeChangeRequestedSpy.count(), 2); | 687 | QCOMPARE(sizeChangeRequestedSpy.count(), 2); | ||
679 | } | 688 | } | ||
680 | QCOMPARE(sizeChangeRequestedSpy.last().first().toSize(), QSize(screens()->size(0))); | 689 | QCOMPARE(sizeChangeRequestedSpy.last().first().toSize(), QSize(screens()->size(0))); | ||
681 | // TODO: should switch to fullscreen once it's updated | 690 | // TODO: should switch to fullscreen once it's updated | ||
682 | QVERIFY(c->isFullScreen()); | 691 | QVERIFY(c->isFullScreen()); | ||
683 | QCOMPARE(c->clientSize(), QSize(100, 50)); | | |||
684 | QVERIFY(geometryChangedSpy.isEmpty()); | 692 | QVERIFY(geometryChangedSpy.isEmpty()); | ||
685 | 693 | | |||
686 | if (xdgShellSurface) { | 694 | if (xdgShellSurface) { | ||
687 | for (const auto &it: configureRequestedSpy) { | 695 | for (const auto &it: configureRequestedSpy) { | ||
688 | xdgShellSurface->ackConfigure(it[2].toInt()); | 696 | xdgShellSurface->ackConfigure(it[2].toInt()); | ||
689 | } | 697 | } | ||
690 | } | 698 | } | ||
691 | | ||||
692 | // render at the new size | 699 | // render at the new size | ||
693 | Test::render(surface.data(), sizeChangeRequestedSpy.last().first().toSize(), Qt::red); | 700 | Test::render(surface.data(), sizeChangeRequestedSpy.last().first().toSize(), Qt::red); | ||
694 | QVERIFY(geometryChangedSpy.wait()); | 701 | QVERIFY(geometryChangedSpy.wait()); | ||
695 | QCOMPARE(geometryChangedSpy.count(), 1); | 702 | QCOMPARE(geometryChangedSpy.count(), 1); | ||
696 | QVERIFY(c->isFullScreen()); | 703 | QVERIFY(c->isFullScreen()); | ||
697 | QVERIFY(!c->isDecorated()); | 704 | QVERIFY(!c->isDecorated()); | ||
698 | QCOMPARE(c->geometry(), QRect(QPoint(0, 0), sizeChangeRequestedSpy.last().first().toSize())); | 705 | QCOMPARE(c->geometry(), QRect(QPoint(0, 0), sizeChangeRequestedSpy.last().first().toSize())); | ||
699 | sizeChangeRequestedSpy.clear(); | 706 | sizeChangeRequestedSpy.clear(); | ||
▲ Show 20 Lines • Show All 352 Lines • Show Last 20 Lines |