Windows: Transform regions of window masks correctly.

Add missing transformation for first rectangle of a region
consisting of multiple rectangles.

Task-number: QTBUG-41300
Change-Id: I1a25c422c93ceade79de79d5c49891e0a7211943
Reviewed-by: MihailNaydenov <garfieldhq@yahoo.com>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
This commit is contained in:
Friedemann Kleint 2014-10-01 12:11:44 +02:00
parent 97a65e1980
commit 24edd8afdc

View File

@ -1826,7 +1826,7 @@ static HRGN qRegionToWinRegion(const QRegion &regionDip)
const int rectCount = rects.size();
if (rectCount == 1)
return createRectRegion(QWindowsScaling::mapToNative(regionDip.boundingRect()));
HRGN hRegion = createRectRegion(rects.front());
HRGN hRegion = createRectRegion(QWindowsScaling::mapToNative(rects.front()));
for (int i = 1; i < rectCount; ++i)
addRectToWinRegion(QWindowsScaling::mapToNative(rects.at(i)), &hRegion);
return hRegion;