From f16de5c1fd8cf0e9d6a37aaa771144ccc4220fba Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 22 Aug 2014 09:38:35 +0200 Subject: [PATCH] Fix composition for translucent AlwaysStackOnTop widgets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Writing out the alpha is re-enabled too early. When blitting the AlwaysStackOnTop widgets as the last step of the composition, they need the exact same settings as the backingstore content, meaning blending but without writing out alpha. Move the glColorMask call to fix this. This will avoid issues with semi-transparent AlwaysStackOnTop widgets when the top-level has alpha enabled too. Task-number: QTBUG-40910 Change-Id: Id6d0d684cfa78bf79b65a097efd92de575e73b2c Reviewed-by: Jørgen Lind --- src/gui/painting/qplatformbackingstore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp index 66a56ac32f..25f25f9fa8 100644 --- a/src/gui/painting/qplatformbackingstore.cpp +++ b/src/gui/painting/qplatformbackingstore.cpp @@ -276,7 +276,6 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion ®i if (d_ptr->needsSwizzle) d_ptr->blitter->setSwizzleRB(false); } - funcs->glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); // Textures for renderToTexture widgets that have WA_AlwaysStackOnTop set. for (int i = 0; i < textures->count(); ++i) { @@ -287,6 +286,7 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion ®i } } + funcs->glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); funcs->glDisable(GL_BLEND); d_ptr->blitter->release();