diff options
Diffstat (limited to 'tests/auto/client/xdgshell/tst_xdgshell.cpp')
-rw-r--r-- | tests/auto/client/xdgshell/tst_xdgshell.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/auto/client/xdgshell/tst_xdgshell.cpp b/tests/auto/client/xdgshell/tst_xdgshell.cpp index 809e564ea..038ff6624 100644 --- a/tests/auto/client/xdgshell/tst_xdgshell.cpp +++ b/tests/auto/client/xdgshell/tst_xdgshell.cpp @@ -65,7 +65,7 @@ void tst_xdgshell::showMinimized() // Make sure the window on the compositor side is/was created here, and not after the test // finishes, as that may mess up for later tests. - QCOMPOSITOR_TRY_VERIFY(surface()); + QCOMPOSITOR_TRY_VERIFY(xdgSurface()); QVERIFY(!window.isExposed()); } @@ -426,9 +426,16 @@ void tst_xdgshell::switchPopups() void tst_xdgshell::pongs() { - QSignalSpy pongSpy(exec([=] { return get<XdgWmBase>(); }), &XdgWmBase::pong); + // Create and show a window to trigger shell integration initialzation, + // otherwise we don't have anything to send ping events to. + QRasterWindow window; + window.resize(200, 200); + window.show(); + // Verify that the client has bound to the global QCOMPOSITOR_TRY_COMPARE(get<XdgWmBase>()->resourceMap().size(), 1); + + QSignalSpy pongSpy(exec([=] { return get<XdgWmBase>(); }), &XdgWmBase::pong); const uint serial = exec([=] { return nextSerial(); }); exec([=] { auto *base = get<XdgWmBase>(); |