summaryrefslogtreecommitdiffstats
path: root/src/opengl/qpaintengine_opengl.cpp
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-05-27 09:45:52 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-05-27 10:46:17 (GMT)
commit73e7d0cbed0261715f534d95f81055bf97ce4314 (patch)
treec47c09db97ea0feac9e6dad40ea2e68105abd2c2 /src/opengl/qpaintengine_opengl.cpp
parent855022d6108f6b3c90832e742217c50550af717d (diff)
downloadQt-73e7d0cbed0261715f534d95f81055bf97ce4314.zip
Qt-73e7d0cbed0261715f534d95f81055bf97ce4314.tar.gz
Qt-73e7d0cbed0261715f534d95f81055bf97ce4314.tar.bz2
Make WA_TranslucentBackground work on QGLWidget for X11
This patch enables QGLWidget's to have an ARGB visual on X11, alowing GL rendering on semi-transparent windows. Reviewed-By: Trond
Diffstat (limited to 'src/opengl/qpaintengine_opengl.cpp')
-rw-r--r--src/opengl/qpaintengine_opengl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index d98cd7c..d5bf1dc 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -1331,7 +1331,7 @@ bool QOpenGLPaintEngine::begin(QPaintDevice *pdev)
d->offscreen.begin();
const QColor &c = d->drawable.backgroundColor();
- glClearColor(c.redF(), c.greenF(), c.blueF(), 1.0);
+ glClearColor(c.redF(), c.greenF(), c.blueF(), d->drawable.format().alpha() ? c.alphaF() : 1.0);
if (d->drawable.context()->d_func()->clear_on_painter_begin && d->drawable.autoFillBackground()) {
GLbitfield clearBits = GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT;
#ifndef QT_OPENGL_ES