[autotests] Only start Xwayland if compositor created a scene

Same as df2c26e3d9 for
WaylandTestApplication.
This commit is contained in:
Martin Gräßlin 2016-04-14 10:29:27 +02:00
parent df2c26e3d9
commit 380c5e0bd8

View file

@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#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;