diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-12-15 16:26:37 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-12-15 16:31:18 (GMT) |
commit | 6b29466ed7b5328ee61c1751bd4efb72f70946d3 (patch) | |
tree | 1b71ecf5c8a43cba0c0e9245e4c48349a77b825a /src/opengl | |
parent | cc70bffdfb1539eceb355cf172fce75efa5e7589 (diff) | |
download | Qt-6b29466ed7b5328ee61c1751bd4efb72f70946d3.zip Qt-6b29466ed7b5328ee61c1751bd4efb72f70946d3.tar.gz Qt-6b29466ed7b5328ee61c1751bd4efb72f70946d3.tar.bz2 |
Fix QGLWidgets created with an alpha channel on X11/EGL
If the QGLWidget's QGLFormat says it should have an alpha
channel, try to find an ARGB Visual.
Reviewed-By: Trond
Task-number: QT-2602
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/qgl_x11egl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index b10e7e9..19026b3 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -336,7 +336,7 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, // If the application has set WA_TranslucentBackground and not explicitly set // the alpha buffer size to zero, modify the format so it have an alpha channel QGLFormat& fmt = d->glcx->d_func()->glFormat; - const bool tryArgbVisual = testAttribute(Qt::WA_TranslucentBackground); + const bool tryArgbVisual = testAttribute(Qt::WA_TranslucentBackground) || fmt.alpha(); if (tryArgbVisual && fmt.alphaBufferSize() == -1) fmt.setAlphaBufferSize(1); |