src/gui/painting/qwindowsurface_s60.cpp
branchRCL_3
changeset 4 3b1da2848fc7
parent 3 41300fa6a67c
child 8 3f74d0d4af4c
--- a/src/gui/painting/qwindowsurface_s60.cpp	Tue Feb 02 00:43:10 2010 +0200
+++ b/src/gui/painting/qwindowsurface_s60.cpp	Fri Feb 19 23:40:16 2010 +0200
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
 **
@@ -145,10 +145,12 @@
 
 void QS60WindowSurface::flush(QWidget *widget, const QRegion &region, const QPoint &)
 {
-    const QVector<QRect> subRects = region.rects();
-    for (int i = 0; i < subRects.count(); ++i) {
-        TRect tr = qt_QRect2TRect(subRects[i]);
+    QWExtra *extra = widget->d_func()->extraData();
+    if (extra && !extra->inExpose) {
+        extra->inExpose = true; // Prevent DrawNow() from calling syncBackingStore() again
+        TRect tr = qt_QRect2TRect(region.boundingRect());
         widget->winId()->DrawNow(tr);
+        extra->inExpose = false;
     }
 }