Skip to content

Commit

Permalink
High DPI/Windows style: Fix potential crash when drawing buttons of m…
Browse files Browse the repository at this point in the history
…aximized QMdiSubWindow

In QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(),
pass the correct rectangle (reflecting the correction factor)
to the function fixAlphaChannel().

Amends e56b8e1.

Pick-to: 5.15
Fixes: QTBUG-84613
Task-number: QTBUG-75927
Change-Id: I5357bb8c55ed26a50cc322ea7a05df4487212fb8
Reviewed-by: Oliver Wolff <[email protected]>
  • Loading branch information
FriedemannKleint committed Jun 2, 2020
1 parent 873aa68 commit 13d95e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 13d95e4

Please sign in to comment.