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>
This commit is contained in:
Liang Qi 2020-02-18 09:41:09 +01:00
parent 2c35a61025
commit 4403ec3bc1
2 changed files with 11 additions and 6 deletions

View File

@ -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

View File

@ -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();