[autotests/integration] Fix PointerInputTest::testUpdateFocusAfterScreenChange

Change the way how a screen is removed. This ensures that Xwayland
doesn't die.
This commit is contained in:
Martin Gräßlin 2016-07-20 14:42:22 +02:00
parent 50645e8dbd
commit 4d5d7a6d7e

View file

@ -244,8 +244,9 @@ void PointerInputTest::testUpdateFocusAfterScreenChange()
QSignalSpy screensChangedSpy(screens(), &Screens::changed);
QVERIFY(screensChangedSpy.isValid());
// now let's remove the screen containing the cursor
QMetaObject::invokeMethod(kwinApp()->platform(), "setOutputCount", Qt::DirectConnection, Q_ARG(int, 1));
QMetaObject::invokeMethod(kwinApp()->platform(), "sizeChanged", Qt::QueuedConnection);
QMetaObject::invokeMethod(kwinApp()->platform(), "outputGeometriesChanged",
Qt::DirectConnection,
Q_ARG(QVector<QRect>, QVector<QRect>{QRect(0, 0, 1280, 1024)}));
QVERIFY(screensChangedSpy.wait());
QCOMPARE(screens()->count(), 1);