diff --git a/autotests/wayland/kwin_wayland_test.cpp b/autotests/wayland/kwin_wayland_test.cpp index 76b1b9a866..2206a00f1d 100644 --- a/autotests/wayland/kwin_wayland_test.cpp +++ b/autotests/wayland/kwin_wayland_test.cpp @@ -19,6 +19,7 @@ along with this program. If not, see . *********************************************************************/ #include "kwin_wayland_test.h" #include "../../abstract_backend.h" +#include "../../composite.h" #include "../../effects.h" #include "../../wayland_server.h" #include "../../workspace.h" @@ -111,8 +112,7 @@ void WaylandTestApplication::continueStartupWithScreens() waylandServer()->initOutputs(); createCompositor(); - - startXwaylandServer(); + connect(Compositor::self(), &Compositor::sceneCreated, this, &WaylandTestApplication::startXwaylandServer); } void WaylandTestApplication::continueStartupWithX() @@ -189,6 +189,7 @@ void WaylandTestApplication::createX11Connection() void WaylandTestApplication::startXwaylandServer() { + disconnect(Compositor::self(), &Compositor::sceneCreated, this, &WaylandTestApplication::startXwaylandServer); int pipeFds[2]; if (pipe(pipeFds) != 0) { std::cerr << "FATAL ERROR failed to create pipe to start Xwayland " << std::endl;