Cocoa: Pick right rectangle when rendering window mask

Ususally, the object setting the mask knows better than the window,
since the latter may not have had its size set by then.

Task-number: QTBUG-29856
Change-Id: Ib24d452a98a76b57f5d9236d5fa1ba4755cf0840
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
Gabriel de Dietrich 2013-02-26 17:26:57 +01:00 committed by The Qt Project
parent 544f1cbe27
commit 083c8ce840

View File

@ -274,7 +274,7 @@ static QTouchDevice *touchDevice = 0;
m_maskImage = 0;
}
const QRect &rect = qt_mac_toQRect([self frame]);
const QRect &rect = region->boundingRect();
QImage maskImage(rect.size(), QImage::Format_RGB888);
maskImage.fill(Qt::white);
QPainter p(&maskImage);