Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/shell_client_test.cpp
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | 60 | private Q_SLOTS: | |||
---|---|---|---|---|---|
72 | void testMinimizeActiveWindow(); | 72 | void testMinimizeActiveWindow(); | ||
73 | void testFullscreen_data(); | 73 | void testFullscreen_data(); | ||
74 | void testFullscreen(); | 74 | void testFullscreen(); | ||
75 | void testUserCanSetFullscreen_data(); | 75 | void testUserCanSetFullscreen_data(); | ||
76 | void testUserCanSetFullscreen(); | 76 | void testUserCanSetFullscreen(); | ||
77 | void testUserSetFullscreenWlShell(); | 77 | void testUserSetFullscreenWlShell(); | ||
78 | void testUserSetFullscreenXdgShell_data(); | 78 | void testUserSetFullscreenXdgShell_data(); | ||
79 | void testUserSetFullscreenXdgShell(); | 79 | void testUserSetFullscreenXdgShell(); | ||
80 | void testMaximizedToFullscreen_data(); | 80 | void testMaximizedToFullscreenWlShell_data(); | ||
81 | void testMaximizedToFullscreen(); | 81 | void testMaximizedToFullscreenWlShell(); | ||
82 | void testMaximizedToFullscreenXdgShell_data(); | ||||
83 | void testMaximizedToFullscreenXdgShell(); | ||||
82 | void testWindowOpensLargerThanScreen_data(); | 84 | void testWindowOpensLargerThanScreen_data(); | ||
83 | void testWindowOpensLargerThanScreen(); | 85 | void testWindowOpensLargerThanScreen(); | ||
84 | void testHidden_data(); | 86 | void testHidden_data(); | ||
85 | void testHidden(); | 87 | void testHidden(); | ||
86 | void testDesktopFileName(); | 88 | void testDesktopFileName(); | ||
87 | void testCaptionSimplified(); | 89 | void testCaptionSimplified(); | ||
88 | void testCaptionMultipleWindows(); | 90 | void testCaptionMultipleWindows(); | ||
89 | void testUnresponsiveWindow_data(); | 91 | void testUnresponsiveWindow_data(); | ||
▲ Show 20 Lines • Show All 522 Lines • ▼ Show 20 Line(s) | 577 | { | |||
612 | QVERIFY(configureRequestedSpy.wait()); | 614 | QVERIFY(configureRequestedSpy.wait()); | ||
613 | QCOMPARE(configureRequestedSpy.count(), 1); | 615 | QCOMPARE(configureRequestedSpy.count(), 1); | ||
614 | QCOMPARE(configureRequestedSpy.first().at(0).toSize(), QSize(100, 50)); | 616 | QCOMPARE(configureRequestedSpy.first().at(0).toSize(), QSize(100, 50)); | ||
615 | QVERIFY(!configureRequestedSpy.first().at(1).value<KWayland::Client::XdgShellSurface::States>().testFlag(KWayland::Client::XdgShellSurface::State::Fullscreen)); | 617 | QVERIFY(!configureRequestedSpy.first().at(1).value<KWayland::Client::XdgShellSurface::States>().testFlag(KWayland::Client::XdgShellSurface::State::Fullscreen)); | ||
616 | QCOMPARE(fullscreenChangedSpy.count(), 2); | 618 | QCOMPARE(fullscreenChangedSpy.count(), 2); | ||
617 | QVERIFY(!c->isFullScreen()); | 619 | QVERIFY(!c->isFullScreen()); | ||
618 | } | 620 | } | ||
619 | 621 | | |||
620 | void TestShellClient::testMaximizedToFullscreen_data() | 622 | void TestShellClient::testMaximizedToFullscreenWlShell_data() | ||
623 | { | ||||
624 | QTest::addColumn<ServerSideDecoration::Mode>("decoMode"); | ||||
625 | | ||||
626 | QTest::newRow("wlShell") << ServerSideDecoration::Mode::Client; | ||||
627 | QTest::newRow("wlShell - deco") << ServerSideDecoration::Mode::Server; | ||||
628 | } | ||||
629 | | ||||
630 | void TestShellClient::testMaximizedToFullscreenWlShell() | ||||
631 | { | ||||
632 | // this test verifies that a window can be properly fullscreened after maximizing | ||||
633 | QScopedPointer<Surface> surface(Test::createSurface()); | ||||
634 | QScopedPointer<ShellSurface> shellSurface(Test::createShellSurface(surface.data())); | ||||
635 | | ||||
636 | QVERIFY(shellSurface.data()); | ||||
637 | | ||||
638 | // create deco | ||||
639 | QScopedPointer<ServerSideDecoration> deco(Test::waylandServerSideDecoration()->create(surface.data())); | ||||
640 | QSignalSpy decoSpy(deco.data(), &ServerSideDecoration::modeChanged); | ||||
641 | QVERIFY(decoSpy.isValid()); | ||||
642 | QVERIFY(decoSpy.wait()); | ||||
643 | QFETCH(ServerSideDecoration::Mode, decoMode); | ||||
644 | deco->requestMode(decoMode); | ||||
645 | QVERIFY(decoSpy.wait()); | ||||
646 | QCOMPARE(deco->mode(), decoMode); | ||||
647 | | ||||
648 | auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); | ||||
649 | QVERIFY(c); | ||||
650 | QVERIFY(c->isActive()); | ||||
651 | QVERIFY(!c->isFullScreen()); | ||||
652 | QCOMPARE(c->clientSize(), QSize(100, 50)); | ||||
653 | QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); | ||||
654 | QSignalSpy fullscreenChangedSpy(c, &ShellClient::fullScreenChanged); | ||||
655 | QVERIFY(fullscreenChangedSpy.isValid()); | ||||
656 | QSignalSpy geometryChangedSpy(c, &ShellClient::geometryChanged); | ||||
657 | QVERIFY(geometryChangedSpy.isValid()); | ||||
658 | QSignalSpy sizeChangeRequestedSpy(shellSurface.data(), SIGNAL(sizeChanged(QSize))); | ||||
659 | QVERIFY(sizeChangeRequestedSpy.isValid()); | ||||
660 | QSignalSpy configureRequestedSpy(shellSurface.data(), SIGNAL(configureRequested(QSize, KWayland::Client::XdgShellSurface::States, quint32))); | ||||
661 | | ||||
662 | shellSurface->setMaximized(); | ||||
663 | | ||||
664 | QVERIFY(sizeChangeRequestedSpy.wait()); | ||||
665 | QCOMPARE(sizeChangeRequestedSpy.count(), 1); | ||||
666 | | ||||
667 | Test::render(surface.data(), sizeChangeRequestedSpy.last().first().toSize(), Qt::red); | ||||
668 | QVERIFY(geometryChangedSpy.wait()); | ||||
669 | | ||||
670 | QCOMPARE(c->maximizeMode(), MaximizeFull); | ||||
671 | QCOMPARE(geometryChangedSpy.isEmpty(), false); | ||||
672 | geometryChangedSpy.clear(); | ||||
673 | | ||||
674 | // fullscreen the window | ||||
675 | shellSurface->setFullscreen(); | ||||
676 | | ||||
677 | QVERIFY(fullscreenChangedSpy.wait()); | ||||
678 | if (decoMode == ServerSideDecoration::Mode::Server) { | ||||
679 | QVERIFY(sizeChangeRequestedSpy.wait()); | ||||
680 | QCOMPARE(sizeChangeRequestedSpy.count(), 2); | ||||
681 | } | ||||
682 | QCOMPARE(sizeChangeRequestedSpy.last().first().toSize(), QSize(screens()->size(0))); | ||||
683 | // TODO: should switch to fullscreen once it's updated | ||||
684 | QVERIFY(c->isFullScreen()); | ||||
685 | | ||||
686 | // render at the new size | ||||
687 | Test::render(surface.data(), sizeChangeRequestedSpy.last().first().toSize(), Qt::red); | ||||
688 | | ||||
689 | QVERIFY(c->isFullScreen()); | ||||
690 | QVERIFY(!c->isDecorated()); | ||||
691 | QCOMPARE(c->geometry(), QRect(QPoint(0, 0), sizeChangeRequestedSpy.last().first().toSize())); | ||||
692 | sizeChangeRequestedSpy.clear(); | ||||
693 | | ||||
694 | // swap back to normal | ||||
695 | shellSurface->setToplevel(); | ||||
696 | | ||||
697 | QVERIFY(fullscreenChangedSpy.wait()); | ||||
698 | if (decoMode == ServerSideDecoration::Mode::Server) { | ||||
699 | QVERIFY(sizeChangeRequestedSpy.wait()); | ||||
700 | // fails as we don't correctly call setMaximize(false) | ||||
701 | // but realistically the only toolkits that support the deco also use XDGShell | ||||
702 | QEXPECT_FAIL("wlShell - deco", "With decoration incorrect geometry requested", Continue); | ||||
703 | QCOMPARE(sizeChangeRequestedSpy.last().first().toSize(), QSize(100, 50)); | ||||
704 | } | ||||
705 | // TODO: should switch to fullscreen once it's updated | ||||
706 | QVERIFY(!c->isFullScreen()); | ||||
707 | QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); | ||||
708 | } | ||||
709 | | ||||
710 | void TestShellClient::testMaximizedToFullscreenXdgShell_data() | ||||
621 | { | 711 | { | ||
622 | QTest::addColumn<Test::ShellSurfaceType>("type"); | 712 | QTest::addColumn<Test::ShellSurfaceType>("type"); | ||
623 | QTest::addColumn<ServerSideDecoration::Mode>("decoMode"); | 713 | QTest::addColumn<ServerSideDecoration::Mode>("decoMode"); | ||
624 | 714 | | |||
625 | QTest::newRow("wlShell") << Test::ShellSurfaceType::WlShell << ServerSideDecoration::Mode::Client; | | |||
626 | QTest::newRow("xdgShellV5") << Test::ShellSurfaceType::XdgShellV5 << ServerSideDecoration::Mode::Client; | 715 | QTest::newRow("xdgShellV5") << Test::ShellSurfaceType::XdgShellV5 << ServerSideDecoration::Mode::Client; | ||
627 | QTest::newRow("xdgShellV6") << Test::ShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Client; | 716 | QTest::newRow("xdgShellV6") << Test::ShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Client; | ||
628 | QTest::newRow("xdgShellWmBase") << Test::ShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Client; | 717 | QTest::newRow("xdgShellWmBase") << Test::ShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Client; | ||
629 | 718 | | |||
630 | QTest::newRow("wlShell - deco") << Test::ShellSurfaceType::WlShell << ServerSideDecoration::Mode::Server; | | |||
631 | QTest::newRow("xdgShellV5 - deco") << Test::ShellSurfaceType::XdgShellV5 << ServerSideDecoration::Mode::Server; | 719 | QTest::newRow("xdgShellV5 - deco") << Test::ShellSurfaceType::XdgShellV5 << ServerSideDecoration::Mode::Server; | ||
632 | QTest::newRow("xdgShellV6 - deco") << Test::ShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Server; | 720 | QTest::newRow("xdgShellV6 - deco") << Test::ShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Server; | ||
633 | QTest::newRow("xdgShellWmBase - deco") << Test::ShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Server; | 721 | QTest::newRow("xdgShellWmBase - deco") << Test::ShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Server; | ||
634 | } | 722 | } | ||
635 | 723 | | |||
636 | void TestShellClient::testMaximizedToFullscreen() | 724 | void TestShellClient::testMaximizedToFullscreenXdgShell() | ||
637 | { | 725 | { | ||
638 | // this test verifies that a window can be properly fullscreened after maximizing | 726 | // this test verifies that a window can be properly fullscreened after maximizing | ||
639 | QScopedPointer<Surface> surface(Test::createSurface()); | 727 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
640 | QFETCH(Test::ShellSurfaceType, type); | 728 | QFETCH(Test::ShellSurfaceType, type); | ||
641 | QScopedPointer<QObject> shellSurface(Test::createShellSurface(type, surface.data())); | 729 | QScopedPointer<QObject> shellSurface(Test::createShellSurface(type, surface.data())); | ||
642 | 730 | | |||
643 | ShellSurface* wlShellSurface = nullptr; | | |||
644 | XdgShellSurface *xdgShellSurface = nullptr; | 731 | XdgShellSurface *xdgShellSurface = nullptr; | ||
645 | // fullscreen the window | 732 | // fullscreen the window | ||
646 | switch (type) { | 733 | switch (type) { | ||
647 | case Test::ShellSurfaceType::WlShell: | | |||
648 | wlShellSurface = qobject_cast<ShellSurface*>(shellSurface.data()); | | |||
649 | break; | | |||
650 | case Test::ShellSurfaceType::XdgShellV5: | 734 | case Test::ShellSurfaceType::XdgShellV5: | ||
651 | case Test::ShellSurfaceType::XdgShellV6: | 735 | case Test::ShellSurfaceType::XdgShellV6: | ||
652 | case Test::ShellSurfaceType::XdgShellStable: | 736 | case Test::ShellSurfaceType::XdgShellStable: | ||
653 | xdgShellSurface = qobject_cast<XdgShellSurface*>(shellSurface.data()); | 737 | xdgShellSurface = qobject_cast<XdgShellSurface*>(shellSurface.data()); | ||
654 | break; | 738 | break; | ||
655 | default: | 739 | default: | ||
656 | Q_UNREACHABLE(); | 740 | Q_UNREACHABLE(); | ||
657 | break; | 741 | break; | ||
658 | } | 742 | } | ||
659 | QVERIFY(wlShellSurface || xdgShellSurface); | 743 | QVERIFY(xdgShellSurface); | ||
660 | QVERIFY(!(wlShellSurface && xdgShellSurface)); | | |||
661 | 744 | | |||
662 | // create deco | 745 | // create deco | ||
663 | QScopedPointer<ServerSideDecoration> deco(Test::waylandServerSideDecoration()->create(surface.data())); | 746 | QScopedPointer<ServerSideDecoration> deco(Test::waylandServerSideDecoration()->create(surface.data())); | ||
664 | QSignalSpy decoSpy(deco.data(), &ServerSideDecoration::modeChanged); | 747 | QSignalSpy decoSpy(deco.data(), &ServerSideDecoration::modeChanged); | ||
665 | QVERIFY(decoSpy.isValid()); | 748 | QVERIFY(decoSpy.isValid()); | ||
666 | QVERIFY(decoSpy.wait()); | 749 | QVERIFY(decoSpy.wait()); | ||
667 | QFETCH(ServerSideDecoration::Mode, decoMode); | 750 | QFETCH(ServerSideDecoration::Mode, decoMode); | ||
668 | deco->requestMode(decoMode); | 751 | deco->requestMode(decoMode); | ||
669 | QVERIFY(decoSpy.wait()); | 752 | QVERIFY(decoSpy.wait()); | ||
670 | QCOMPARE(deco->mode(), decoMode); | 753 | QCOMPARE(deco->mode(), decoMode); | ||
671 | 754 | | |||
672 | auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); | 755 | auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); | ||
673 | QVERIFY(c); | 756 | QVERIFY(c); | ||
674 | QVERIFY(c->isActive()); | 757 | QVERIFY(c->isActive()); | ||
675 | QVERIFY(!c->isFullScreen()); | 758 | QVERIFY(!c->isFullScreen()); | ||
676 | QCOMPARE(c->clientSize(), QSize(100, 50)); | 759 | QCOMPARE(c->clientSize(), QSize(100, 50)); | ||
677 | QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); | 760 | QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); | ||
678 | QSignalSpy fullscreenChangedSpy(c, &ShellClient::fullScreenChanged); | 761 | QSignalSpy fullscreenChangedSpy(c, &ShellClient::fullScreenChanged); | ||
679 | QVERIFY(fullscreenChangedSpy.isValid()); | 762 | QVERIFY(fullscreenChangedSpy.isValid()); | ||
680 | QSignalSpy geometryChangedSpy(c, &ShellClient::geometryChanged); | 763 | QSignalSpy geometryChangedSpy(c, &ShellClient::geometryChanged); | ||
681 | QVERIFY(geometryChangedSpy.isValid()); | 764 | QVERIFY(geometryChangedSpy.isValid()); | ||
682 | QSignalSpy sizeChangeRequestedSpy(shellSurface.data(), SIGNAL(sizeChanged(QSize))); | 765 | QSignalSpy sizeChangeRequestedSpy(shellSurface.data(), SIGNAL(sizeChanged(QSize))); | ||
683 | QVERIFY(sizeChangeRequestedSpy.isValid()); | 766 | QVERIFY(sizeChangeRequestedSpy.isValid()); | ||
684 | QSignalSpy configureRequestedSpy(shellSurface.data(), SIGNAL(configureRequested(QSize, KWayland::Client::XdgShellSurface::States, quint32))); | 767 | QSignalSpy configureRequestedSpy(shellSurface.data(), SIGNAL(configureRequested(QSize, KWayland::Client::XdgShellSurface::States, quint32))); | ||
685 | if (xdgShellSurface) { | | |||
686 | QVERIFY(configureRequestedSpy.isValid()); | 768 | QVERIFY(configureRequestedSpy.isValid()); | ||
687 | } | | |||
688 | | ||||
689 | // change to maximize | | |||
690 | if (wlShellSurface) { | | |||
691 | wlShellSurface->setMaximized(); | | |||
692 | } | | |||
693 | if (xdgShellSurface) { | | |||
694 | xdgShellSurface->setMaximized(true); | 769 | xdgShellSurface->setMaximized(true); | ||
695 | } | | |||
696 | QVERIFY(sizeChangeRequestedSpy.wait()); | 770 | QVERIFY(sizeChangeRequestedSpy.wait()); | ||
697 | QCOMPARE(sizeChangeRequestedSpy.count(), 1); | 771 | QCOMPARE(sizeChangeRequestedSpy.count(), 1); | ||
698 | 772 | | |||
699 | if (xdgShellSurface) { | | |||
700 | for (const auto &it: configureRequestedSpy) { | 773 | for (const auto &it: configureRequestedSpy) { | ||
701 | xdgShellSurface->ackConfigure(it[2].toInt()); | 774 | xdgShellSurface->ackConfigure(it[2].toInt()); | ||
702 | } | 775 | } | ||
703 | } | | |||
704 | Test::render(surface.data(), sizeChangeRequestedSpy.last().first().toSize(), Qt::red); | 776 | Test::render(surface.data(), sizeChangeRequestedSpy.last().first().toSize(), Qt::red); | ||
705 | QVERIFY(geometryChangedSpy.wait()); | 777 | QVERIFY(geometryChangedSpy.wait()); | ||
706 | 778 | | |||
707 | QCOMPARE(c->maximizeMode(), MaximizeFull); | 779 | QCOMPARE(c->maximizeMode(), MaximizeFull); | ||
708 | QCOMPARE(geometryChangedSpy.isEmpty(), false); | 780 | QCOMPARE(geometryChangedSpy.isEmpty(), false); | ||
709 | geometryChangedSpy.clear(); | 781 | geometryChangedSpy.clear(); | ||
710 | 782 | | |||
711 | // fullscreen the window | 783 | // fullscreen the window | ||
712 | if (wlShellSurface) { | | |||
713 | wlShellSurface->setFullscreen(); | | |||
714 | } | | |||
715 | if (xdgShellSurface) { | | |||
716 | xdgShellSurface->setFullscreen(true); | 784 | xdgShellSurface->setFullscreen(true); | ||
717 | } | | |||
718 | QVERIFY(fullscreenChangedSpy.wait()); | 785 | QVERIFY(fullscreenChangedSpy.wait()); | ||
719 | if (decoMode == ServerSideDecoration::Mode::Server) { | 786 | if (decoMode == ServerSideDecoration::Mode::Server) { | ||
720 | QVERIFY(sizeChangeRequestedSpy.wait()); | 787 | QVERIFY(sizeChangeRequestedSpy.wait()); | ||
721 | QCOMPARE(sizeChangeRequestedSpy.count(), 2); | 788 | QCOMPARE(sizeChangeRequestedSpy.count(), 2); | ||
722 | } | 789 | } | ||
723 | QCOMPARE(sizeChangeRequestedSpy.last().first().toSize(), QSize(screens()->size(0))); | 790 | QCOMPARE(sizeChangeRequestedSpy.last().first().toSize(), QSize(screens()->size(0))); | ||
724 | // TODO: should switch to fullscreen once it's updated | 791 | // TODO: should switch to fullscreen once it's updated | ||
725 | QVERIFY(c->isFullScreen()); | 792 | QVERIFY(c->isFullScreen()); | ||
726 | 793 | | |||
727 | if (xdgShellSurface) { | | |||
728 | for (const auto &it: configureRequestedSpy) { | 794 | for (const auto &it: configureRequestedSpy) { | ||
729 | xdgShellSurface->ackConfigure(it[2].toInt()); | 795 | xdgShellSurface->ackConfigure(it[2].toInt()); | ||
730 | } | 796 | } | ||
731 | } | | |||
732 | // render at the new size | 797 | // render at the new size | ||
733 | Test::render(surface.data(), sizeChangeRequestedSpy.last().first().toSize(), Qt::red); | 798 | Test::render(surface.data(), sizeChangeRequestedSpy.last().first().toSize(), Qt::red); | ||
734 | 799 | | |||
735 | QVERIFY(c->isFullScreen()); | 800 | QVERIFY(c->isFullScreen()); | ||
736 | QVERIFY(!c->isDecorated()); | 801 | QVERIFY(!c->isDecorated()); | ||
737 | QCOMPARE(c->geometry(), QRect(QPoint(0, 0), sizeChangeRequestedSpy.last().first().toSize())); | 802 | QCOMPARE(c->geometry(), QRect(QPoint(0, 0), sizeChangeRequestedSpy.last().first().toSize())); | ||
738 | sizeChangeRequestedSpy.clear(); | 803 | sizeChangeRequestedSpy.clear(); | ||
739 | 804 | | |||
740 | // swap back to normal | 805 | // swap back to normal | ||
741 | switch (type) { | 806 | switch (type) { | ||
742 | case Test::ShellSurfaceType::WlShell: | | |||
743 | qobject_cast<ShellSurface*>(shellSurface.data())->setToplevel(); | | |||
744 | break; | | |||
745 | case Test::ShellSurfaceType::XdgShellV5: | 807 | case Test::ShellSurfaceType::XdgShellV5: | ||
746 | case Test::ShellSurfaceType::XdgShellV6: | 808 | case Test::ShellSurfaceType::XdgShellV6: | ||
747 | case Test::ShellSurfaceType::XdgShellStable: | 809 | case Test::ShellSurfaceType::XdgShellStable: | ||
748 | qobject_cast<XdgShellSurface*>(shellSurface.data())->setFullscreen(false); | 810 | qobject_cast<XdgShellSurface*>(shellSurface.data())->setFullscreen(false); | ||
749 | qobject_cast<XdgShellSurface*>(shellSurface.data())->setMaximized(false); | 811 | qobject_cast<XdgShellSurface*>(shellSurface.data())->setMaximized(false); | ||
750 | break; | 812 | break; | ||
813 | default: | ||||
814 | Q_UNREACHABLE(); | ||||
751 | } | 815 | } | ||
752 | QVERIFY(fullscreenChangedSpy.wait()); | 816 | QVERIFY(fullscreenChangedSpy.wait()); | ||
753 | if (decoMode == ServerSideDecoration::Mode::Server) { | 817 | if (decoMode == ServerSideDecoration::Mode::Server) { | ||
754 | QVERIFY(sizeChangeRequestedSpy.wait()); | 818 | QVERIFY(sizeChangeRequestedSpy.wait()); | ||
755 | // XDG will legitimately get two updates. They might be batched | 819 | // XDG will legitimately get two updates. They might be batched | ||
756 | if (xdgShellSurface && sizeChangeRequestedSpy.count() == 1) { | 820 | if (xdgShellSurface && sizeChangeRequestedSpy.count() == 1) { | ||
757 | QVERIFY(sizeChangeRequestedSpy.wait()); | 821 | QVERIFY(sizeChangeRequestedSpy.wait()); | ||
758 | } | 822 | } | ||
759 | | ||||
760 | // fails as we don't correctly call setMaximize(false) | | |||
761 | // but realistically the only toolkits that support the deco also use XDGShell | | |||
762 | QEXPECT_FAIL("wlShell - deco", "With decoration incorrect geometry requested", Continue); | | |||
763 | | ||||
764 | QCOMPARE(sizeChangeRequestedSpy.last().first().toSize(), QSize(100, 50)); | 823 | QCOMPARE(sizeChangeRequestedSpy.last().first().toSize(), QSize(100, 50)); | ||
765 | } | 824 | } | ||
766 | // TODO: should switch to fullscreen once it's updated | 825 | // TODO: should switch to fullscreen once it's updated | ||
767 | QVERIFY(!c->isFullScreen()); | 826 | QVERIFY(!c->isFullScreen()); | ||
768 | QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); | 827 | QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); | ||
769 | } | 828 | } | ||
770 | 829 | | |||
771 | void TestShellClient::testWindowOpensLargerThanScreen_data() | 830 | void TestShellClient::testWindowOpensLargerThanScreen_data() | ||
▲ Show 20 Lines • Show All 475 Lines • Show Last 20 Lines |