tests: skip tst_QScreen::grabWindow() on XWayland

Pick-to: 6.5
Task-number: QTBUG-104595
Change-Id: Icb56a587dfbad84533616160817a3d43411146f1
Reviewed-by: Kalle Viironen <kalle.viironen@qt.io>
Reviewed-by: Simo Fält <simo.falt@qt.io>
This commit is contained in:
Liang Qi 2023-03-02 10:24:22 +01:00
parent 2adb22fba5
commit cd0301a78e

View File

@ -183,10 +183,9 @@ void tst_QScreen::orientationChange()
void tst_QScreen::grabWindow_data() void tst_QScreen::grabWindow_data()
{ {
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability( if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ScreenWindowGrabbing)
QPlatformIntegration::ScreenWindowGrabbing)) { || (QGuiApplication::platformName().toLower() == QStringLiteral("xcb") && !qEnvironmentVariableIsEmpty("WAYLAND_DISPLAY")))
QSKIP("This platform does not support grabbing windows on screen."); QSKIP("This platform does not support grabbing windows on screen.");
}
QTest::addColumn<int>("screenIndex"); QTest::addColumn<int>("screenIndex");
QTest::addColumn<QByteArray>("screenName"); QTest::addColumn<QByteArray>("screenName");
QTest::addColumn<bool>("grabWindow"); QTest::addColumn<bool>("grabWindow");