summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/opengl/qgl_x11egl.cpp2
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);