diff --git a/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp b/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp index b537b211c16..f64add31173 100644 --- a/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp +++ b/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp @@ -183,10 +183,9 @@ void tst_QScreen::orientationChange() void tst_QScreen::grabWindow_data() { - if (!QGuiApplicationPrivate::platformIntegration()->hasCapability( - QPlatformIntegration::ScreenWindowGrabbing)) { + if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ScreenWindowGrabbing) + || (QGuiApplication::platformName().toLower() == QStringLiteral("xcb") && !qEnvironmentVariableIsEmpty("WAYLAND_DISPLAY"))) QSKIP("This platform does not support grabbing windows on screen."); - } QTest::addColumn("screenIndex"); QTest::addColumn("screenName"); QTest::addColumn("grabWindow");