tests: extend tst_QBackingStore::flush()

There is a bug in GNOME 46.0 on Ubuntu 24.04 Wayland when showing
a maximized or fullscreen window.

Task-number: QTBUG-127920
Change-Id: I49c0f53b16f501072cbbe92ddd79ff21fb9adb27
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 66591b658f4270252f8bf342dac7e2a9bcad34a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Liang Qi 2024-07-31 11:23:48 +02:00 committed by Qt Cherry-pick Bot
parent c178110208
commit cf32e1697e
2 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,9 @@
# QTBUG-127920
[flush:single-buffer:maximized]
wayland ubuntu-24.04
[flush:single-buffer:fullscreen]
wayland ubuntu-24.04
[flush:double-buffer:maximized]
wayland ubuntu-24.04
[flush:double-buffer:fullscreen]
wayland ubuntu-24.04

View File

@ -31,6 +31,7 @@ private slots:
void scrollRectInImage();
void scroll();
void flush_data();
void flush();
void staticContents();
@ -267,11 +268,22 @@ private:
QBackingStore backingStore;
};
void tst_QBackingStore::flush_data()
{
QTest::addColumn<Qt::WindowState>("windowState");
QTest::newRow("normal") << Qt::WindowNoState;
QTest::newRow("maximized") << Qt::WindowMaximized;
QTest::newRow("fullscreen") << Qt::WindowFullScreen;
}
void tst_QBackingStore::flush()
{
QFETCH(Qt::WindowState, windowState);
Window window;
window.setGeometry(20, 20, 200, 200);
window.showMaximized();
window.setWindowState(windowState);
window.setVisible(true);
QTRY_VERIFY(window.isExposed());
}