summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-02-15 16:04:03 (GMT)
committeraxis <qt-info@nokia.com>2010-02-15 16:09:53 (GMT)
commite024cc10a97b9518b2dd577175feb66258d7ac05 (patch)
tree016e54438cfcc761b9d8bea69871ba0983d3a9e3 /src
parent60db3752fbbf6453ae935798d149986fb64e0507 (diff)
downloadQt-e024cc10a97b9518b2dd577175feb66258d7ac05.zip
Qt-e024cc10a97b9518b2dd577175feb66258d7ac05.tar.gz
Qt-e024cc10a97b9518b2dd577175feb66258d7ac05.tar.bz2
Fixed missing repaints on S60 3.1.
The bug happened when a paint event came in from Symbian, but the painted area was bigger than the exposed rect being passed in by Symbian. In these cases we would lose updates to the area outside. Fixed by calling Draw() once more if we detect that we painted a larger area to the backing store. It is still a mystery why this worked on 5.0 though... :-P AutoTest: QWidget passed RevBy: Jason Barron Task: QTBUG-8200
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qwindowsurface_s60.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp
index 6cbf3d9..028ec48 100644
--- a/src/gui/painting/qwindowsurface_s60.cpp
+++ b/src/gui/painting/qwindowsurface_s60.cpp
@@ -149,11 +149,19 @@ void QS60WindowSurface::flush(QWidget *widget, const QRegion &region, const QPoi
Q_ASSERT(window);
QTLWExtra *topExtra = window->d_func()->maybeTopData();
Q_ASSERT(topExtra);
+ QRect qr = region.boundingRect();
if (!topExtra->inExpose) {
topExtra->inExpose = true; // Prevent DrawNow() from calling syncBackingStore() again
- TRect tr = qt_QRect2TRect(region.boundingRect());
+ TRect tr = qt_QRect2TRect(qr);
widget->winId()->DrawNow(tr);
topExtra->inExpose = false;
+ } else {
+ // This handles the case when syncBackingStore updates content outside of the
+ // original drawing rectangle. This might happen if there are pending update()
+ // events at the same time as we get a Draw() from Symbian.
+ QRect drawRect = qt_TRect2QRect(widget->winId()->DrawableWindow()->GetDrawRect());
+ if (!drawRect.contains(qr))
+ widget->winId()->DrawDeferred();
}
}