summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcocoaview_mac.mm
diff options
context:
space:
mode:
authorFabien Freling <fabien.freling@nokia.com>2010-02-12 15:42:42 (GMT)
committerFabien Freling <fabien.freling@nokia.com>2010-02-12 15:42:42 (GMT)
commit441aff9d01a1530d2b187098c7c47bc683116a66 (patch)
tree03897c585c50e0047d85a0b3cc7da919bf479eec /src/gui/kernel/qcocoaview_mac.mm
parent3abc322eb6834aa61cc77d73dbd17c4389accb00 (diff)
downloadQt-441aff9d01a1530d2b187098c7c47bc683116a66.zip
Qt-441aff9d01a1530d2b187098c7c47bc683116a66.tar.gz
Qt-441aff9d01a1530d2b187098c7c47bc683116a66.tar.bz2
Fix QRegion under Mac OS X.
Now it takes the intersection of QRects for the region to repaint instead of taking the bounding box.
Diffstat (limited to 'src/gui/kernel/qcocoaview_mac.mm')
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 8c5d166..aa00e97 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -488,7 +488,15 @@ extern "C" {
qWarning("QWidget::repaint: Recursive repaint detected");
const QRect qrect = QRect(aRect.origin.x, aRect.origin.y, aRect.size.width, aRect.size.height);
- QRegion qrgn(qrect);
+ QRegion qrgn;
+
+ const NSRect *rects;
+ NSInteger count;
+ [self getRectsBeingDrawn:&rects count:&count];
+ for (int i = 0; i < count; ++i) {
+ QRect tmpRect = QRect(rects[i].origin.x, rects[i].origin.y, rects[i].size.width, rects[i].size.height);
+ qrgn += tmpRect;
+ }
if (!qwidget->isWindow() && !qobject_cast<QAbstractScrollArea *>(qwidget->parent())) {
const QRegion &parentMask = qwidget->window()->mask();