From 3d34c9b78ee96b20c5b99358fa574ce057e9ef47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 19 May 2011 16:18:21 +0200 Subject: Full translucent background support in xcb and xlib backend. Make sure to pick an alpha visual also for non-GL surface types, and to ask for alpha in the window format if the WA_TranslucentBackground attribute is set. Reviewed-by: Janusz Lewandowski (cherry picked from commit 6241e39cff9311c943430ff2f31236b13618f2ac) --- src/opengl/qgl_qpa.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/opengl/qgl_qpa.cpp') diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp index 994344c6eb..9da650f98d 100644 --- a/src/opengl/qgl_qpa.cpp +++ b/src/opengl/qgl_qpa.cpp @@ -150,6 +150,8 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) if (shareContext) { winFormat.setSharedContext(shareContext->d_func()->platformContext); } + if (widget->testAttribute(Qt::WA_TranslucentBackground)) + winFormat.setAlpha(true); winFormat.setWindowApi(QPlatformWindowFormat::OpenGL); winFormat.setWindowSurface(false); widget->setPlatformWindowFormat(winFormat); -- cgit v1.2.3