From b48ae5932131b6d0934a50846cad441f6e9f5ccd Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Mon, 9 Nov 2009 10:18:35 +1000 Subject: Set frameless window hints on QGL test windows under QWS QWS combines the window title bar and the top-level widget into one window surface, which causes problems when the top-level widget is a QGLWidget: the raw GL surface contents are not the same as on other platforms where only the top-level widget contents are included in the window surface. This change sets Qt::FramelessWindowHint on QWS systems on widgets where we need to read back the top-level widget for comparison against a reference image. Reviewed-by: Sarah Smith --- tests/auto/qgl/tst_qgl.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index 2c60eb2..6703d4e 100644 --- a/tests/auto/qgl/tst_qgl.cpp +++ b/tests/auto/qgl/tst_qgl.cpp @@ -805,6 +805,9 @@ void tst_QGL::graphicsViewClipping() scene.addWidget(widget)->setPos(0, 0); QGraphicsView view(&scene); +#ifdef Q_WS_QWS + view.setWindowFlags(Qt::FramelessWindowHint); +#endif view.resize(2*size, 2*size); QGLWidget *viewport = new QGLWidget; @@ -949,6 +952,9 @@ public: void tst_QGL::glWidgetRendering() { GLWidget w; +#ifdef Q_WS_QWS + w.setWindowFlags(Qt::FramelessWindowHint); +#endif w.setGeometry(100, 100, 200, 200); w.show(); @@ -1176,6 +1182,9 @@ void tst_QGL::glFBOUseInGLWidget() QSKIP("QGLFramebufferObject not supported on this platform", SkipSingle); FBOUseInGLWidget w; +#ifdef Q_WS_QWS + w.setWindowFlags(Qt::FramelessWindowHint); +#endif w.resize(128, 128); w.show(); @@ -1562,6 +1571,9 @@ protected: void tst_QGL::replaceClipping() { ReplaceClippingGLWidget glw; +#ifdef Q_WS_QWS + glw.setWindowFlags(Qt::FramelessWindowHint); +#endif glw.resize(300, 300); glw.show(); @@ -1693,6 +1705,9 @@ protected: void tst_QGL::clipTest() { ClipTestGLWidget glw; +#ifdef Q_WS_QWS + glw.setWindowFlags(Qt::FramelessWindowHint); +#endif glw.resize(220, 220); glw.show(); -- cgit v0.12