summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/client/client/tst_client.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp
index 1e3d0f1d1..05b8bac1a 100644
--- a/tests/auto/client/client/tst_client.cpp
+++ b/tests/auto/client/client/tst_client.cpp
@@ -113,7 +113,10 @@ class TestGlWindow : public QOpenGLWindow
public:
TestGlWindow();
- uint paintGLCalled = 0;
+ int paintGLCalled = 0;
+
+public slots:
+ void hideShow();
protected:
void paintGL() override;
@@ -122,6 +125,12 @@ protected:
TestGlWindow::TestGlWindow()
{}
+void TestGlWindow::hideShow()
+{
+ setVisible(false);
+ setVisible(true);
+}
+
void TestGlWindow::paintGL()
{
glClear(GL_COLOR_BUFFER_BIT);
@@ -564,7 +573,15 @@ void tst_WaylandClient::glWindow()
QTRY_VERIFY(surface = compositor->surface());
compositor->sendShellSurfaceConfigure(surface);
- QTRY_VERIFY(testWindow->paintGLCalled);
+ QTRY_COMPARE(testWindow->paintGLCalled, 1);
+
+ //QTBUG-63411
+ QMetaObject::invokeMethod(testWindow.data(), "hideShow", Qt::QueuedConnection);
+ testWindow->requestUpdate();
+ QTRY_COMPARE(testWindow->paintGLCalled, 2);
+
+ testWindow->requestUpdate();
+ QTRY_COMPARE(testWindow->paintGLCalled, 3);
//confirm we don't crash when we delete an already hidden GL window
//QTBUG-65553