From 13d95e415e0870fd13ebef8b888364d8b9ebb9e5 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 2 Jun 2020 10:19:06 +0200 Subject: [PATCH] High DPI/Windows style: Fix potential crash when drawing buttons of maximized QMdiSubWindow In QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), pass the correct rectangle (reflecting the correction factor) to the function fixAlphaChannel(). Amends e56b8e1e59b6df7c7abd48b163abe6846849eb7a. Pick-to: 5.15 Fixes: QTBUG-84613 Task-number: QTBUG-75927 Change-Id: I5357bb8c55ed26a50cc322ea7a05df4487212fb8 Reviewed-by: Oliver Wolff --- src/plugins/styles/windowsvista/qwindowsxpstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp index 67198e701c7..e57ebfeeffc 100644 --- a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp +++ b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp @@ -972,7 +972,7 @@ bool QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(XPThemeData &themeDa // Fix alpha values, if needed if (potentialInvalidAlpha) - wasAlphaFixed = fixAlphaChannel(rect); + wasAlphaFixed = fixAlphaChannel(drawRect); QImage::Format format; if ((partIsTransparent && !wasAlphaSwapped) || (!partIsTransparent && hasAlpha)) {