diff --git a/autotests/integration/xdgshellclient_test.cpp b/autotests/integration/xdgshellclient_test.cpp index bc5375713e..feba4bf4c7 100644 --- a/autotests/integration/xdgshellclient_test.cpp +++ b/autotests/integration/xdgshellclient_test.cpp @@ -1848,11 +1848,16 @@ void TestXdgShellClient::testMaximizeAndChangeDecorationModeAfterInitialCommit() // if an xdg-toplevel surface is set maximized and decoration mode changes after initial commit. QScopedPointer surface(Test::createSurface()); - QScopedPointer shellSurface(Test::createXdgToplevelSurface(surface.data())); // will wait for the first configure event + QScopedPointer shellSurface(Test::createXdgToplevelSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly)); QScopedPointer decoration(Test::createXdgToplevelDecorationV1(shellSurface.data())); QSignalSpy toplevelConfigureRequestedSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested); QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested); + // Commit the initial state. + surface->commit(KWayland::Client::Surface::CommitFlag::None); + QVERIFY(surfaceConfigureRequestedSpy.wait()); + QCOMPARE(toplevelConfigureRequestedSpy.last().at(0).value(), QSize(0, 0)); + // Request maximized mode and set decoration mode, i.e. perform late initialization. shellSurface->set_maximized(); decoration->set_mode(Test::XdgToplevelDecorationV1::mode_client_side); @@ -1871,11 +1876,16 @@ void TestXdgShellClient::testFullScreenAndChangeDecorationModeAfterInitialCommit // if an xdg-toplevel surface is set fullscreen and decoration mode changes after initial commit. QScopedPointer surface(Test::createSurface()); - QScopedPointer shellSurface(Test::createXdgToplevelSurface(surface.data())); // will wait for the first configure event + QScopedPointer shellSurface(Test::createXdgToplevelSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly)); QScopedPointer decoration(Test::createXdgToplevelDecorationV1(shellSurface.data())); QSignalSpy toplevelConfigureRequestedSpy(shellSurface.data(), &Test::XdgToplevel::configureRequested); QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested); + // Commit the initial state. + surface->commit(KWayland::Client::Surface::CommitFlag::None); + QVERIFY(surfaceConfigureRequestedSpy.wait()); + QCOMPARE(toplevelConfigureRequestedSpy.last().at(0).value(), QSize(0, 0)); + // Request fullscreen mode and set decoration mode, i.e. perform late initialization. shellSurface->set_fullscreen(nullptr); decoration->set_mode(Test::XdgToplevelDecorationV1::mode_client_side);