From 89765ced6e9ce7e20aa1090439869509f86a070a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 14 Jul 2016 16:19:42 +0200 Subject: Windows: Add a workaround for render-to-texture widgets for translucent windows Do not attempt to switch from translucent GL windows (emulated by DWM blur behind) to translucent raster windows (using layered windows) as this produces warnings from UpdateLayeredWindowIndirect() failing. Task-number: QTBUG-54734 Change-Id: Ie05126c5cb091a00f17b88a74b287c90aa2dfebd Reviewed-by: Joni Poikelin Reviewed-by: Laszlo Agocs --- src/widgets/kernel/qwidgetbackingstore.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp index 7473dd1dfb..3f62e7913f 100644 --- a/src/widgets/kernel/qwidgetbackingstore.cpp +++ b/src/widgets/kernel/qwidgetbackingstore.cpp @@ -1018,9 +1018,11 @@ static QPlatformTextureList *widgetTexturesFor(QWidget *tlw, QWidget *widget) // The Windows compositor handles fullscreen OpenGL window specially. Besides // having trouble with popups, it also has issues with flip-flopping between // OpenGL-based and normal flushing. Therefore, stick with GL for fullscreen -// windows. (QTBUG-53515) +// windows (QTBUG-53515). Similary, translucent windows should not switch to +// layered native windows (QTBUG-54734). #if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && !defined(Q_OS_WINCE) || tlw->windowState().testFlag(Qt::WindowFullScreen) + || tlw->testAttribute(Qt::WA_TranslucentBackground) #endif ) { -- cgit v1.2.3