diff options
author | Liang Qi <liang.qi@qt.io> | 2020-02-18 09:41:09 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2020-02-25 18:58:17 +0100 |
commit | 4403ec3bc1501cde454b0546759d4c27f9b6cb1b (patch) | |
tree | 0e06a1d20ba3fd3dd999001fa8e7428d9550544d /tests/auto/widgets | |
parent | 2c35a6102539510bb850f587690b036d96863338 (diff) |
tests/xcb: fix tst_QWidget::updateWhileMinimized() on mutter/GNOME Shell
Task-number: QTBUG-68862
Change-Id: I6247867ae4ec126ab0549741f2d2d491a7f2e8a0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/BLACKLIST | 5 | ||||
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 12 |
2 files changed, 11 insertions, 6 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST index cf35491ec0..70ea8433a6 100644 --- a/tests/auto/widgets/kernel/qwidget/BLACKLIST +++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST @@ -8,11 +8,6 @@ b2qt opensuse-42.3 [restoreVersion1Geometry] ubuntu-16.04 -[updateWhileMinimized] -ubuntu-18.04 -rhel-7.4 -ubuntu-16.04 -rhel-7.6 [focusProxyAndInputMethods] rhel-7.6 opensuse-leap diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 2dd9e13b80..ce3419f8ad 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -7914,7 +7914,17 @@ void tst_QWidget::updateWhileMinimized() QTest::qWait(10); if (m_platform == QStringLiteral("winrt")) QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort); - QCOMPARE(widget.numPaintEvents, 0); + int count = 0; + // mutter/GNOME Shell doesn't unmap when minimizing window. + // More details at https://gitlab.gnome.org/GNOME/mutter/issues/185 + if (m_platform == QStringLiteral("xcb")) { + const QString desktop = qgetenv("XDG_CURRENT_DESKTOP"); + qDebug() << "xcb: XDG_CURRENT_DESKTOP=" << desktop; + if (desktop == QStringLiteral("ubuntu:GNOME") + || desktop == QStringLiteral("GNOME-Classic:GNOME")) + count = 1; + } + QCOMPARE(widget.numPaintEvents, count); // Restore window. widget.showNormal(); |