summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorMorten Sørvig <msorvig@trolltech.com>2009-06-26 15:26:15 (GMT)
committerMorten Sørvig <msorvig@trolltech.com>2009-06-26 15:26:15 (GMT)
commit8fae676fb0bd36f507ffa0815fa824370eb06a7c (patch)
treedfd42f141fd44d1ebfcdd7e3dc57c2b5b502e98f /src/gui/kernel
parent2df18ac4dd17f8630f1ea0f6dc2415aca53d931a (diff)
downloadQt-8fae676fb0bd36f507ffa0815fa824370eb06a7c.zip
Qt-8fae676fb0bd36f507ffa0815fa824370eb06a7c.tar.gz
Qt-8fae676fb0bd36f507ffa0815fa824370eb06a7c.tar.bz2
Fix painting errors in QScrollArea on Mac (Carbon)
This is mainly a stop-gap solution for 4.5.x. It trades painting performance for correct painting. Commit 7988d05da changed the opaque test from q->testAttribute(Qt::WA_OpaquePaintEvent) to qt_widget_private(w)->isOpaque in qt_mac_update_widget_posisiton. This means we'll do optimized moves in more cases. Unfortunately it also causes painting errors in some cases (see the task). Revert the commit for now to put the 4.5 branch in a god shape. Task-number: 252295 Reviewed-by: nrc
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwidget_mac.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index d2b059e..8f04b89 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -3749,7 +3749,7 @@ static void qt_mac_update_widget_posisiton(QWidget *q, QRect oldRect, QRect newR
// Perform a normal (complete repaint) update in some cases:
if (
// move-by-scroll requires QWidgetPrivate::isOpaque set
- (isMove && qd->isOpaque == false) ||
+ (isMove && q->testAttribute(Qt::WA_OpaquePaintEvent) == false) ||
// limited update on resize requires WA_StaticContents.
(isResize && q->testAttribute(Qt::WA_StaticContents) == false) ||
@@ -4273,7 +4273,7 @@ void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &r)
HIRect bounds = CGRectMake(w->data->crect.x(), w->data->crect.y(),
w->data->crect.width(), w->data->crect.height());
HIViewRef hiview = qt_mac_nativeview_for(w);
- const bool opaque = qt_widget_private(w)->isOpaque;
+ const bool opaque = q->testAttribute(Qt::WA_OpaquePaintEvent);
if (opaque)
HIViewSetDrawingEnabled(hiview, false);