Skip tst_qwindow test when running on Wayland

The tst_qwindow test failed with a warning that programmatically
moving the mouse cursor is not possible with Wayland.

Task-number: QTBUG-91418
Change-Id: I02ceb2af43fbc83a4e6ae09718315f5f79ff8285
Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2021-02-26 09:00:46 +01:00
parent 5552d3d446
commit 2bf9061760
1 changed files with 2 additions and 0 deletions

View File

@ -2385,6 +2385,8 @@ void tst_QWindow::spuriousMouseMove()
const QString &platformName = QGuiApplication::platformName();
if (platformName == QLatin1String("offscreen") || platformName == QLatin1String("cocoa"))
QSKIP("No enter events sent");
if (platformName == QLatin1String("wayland"))
QSKIP("Setting mouse cursor position is not possible on Wayland");
const QRect screenGeometry = QGuiApplication::primaryScreen()->geometry();
const QPoint center = screenGeometry.center();
QCursor::setPos(center);