From cd0301a78ea79da08f873d4a6ed817a93a512932 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Thu, 2 Mar 2023 10:24:22 +0100 Subject: [PATCH] tests: skip tst_QScreen::grabWindow() on XWayland MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pick-to: 6.5 Task-number: QTBUG-104595 Change-Id: Icb56a587dfbad84533616160817a3d43411146f1 Reviewed-by: Kalle Viironen Reviewed-by: Simo Fält --- tests/auto/gui/kernel/qscreen/tst_qscreen.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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");