From e024cc10a97b9518b2dd577175feb66258d7ac05 Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 15 Feb 2010 17:04:03 +0100 Subject: 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 --- src/gui/painting/qwindowsurface_s60.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 ®ion, 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(); } } -- cgit v0.12