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 <oliver.wolff@qt.io>
This commit is contained in:
Friedemann Kleint 2020-06-02 10:19:06 +02:00
parent 873aa682c5
commit 13d95e415e

View File

@ -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)) {