src/gui/painting/qwindowsurface_s60.cpp
branchRCL_3
changeset 4 3b1da2848fc7
parent 3 41300fa6a67c
child 7 3f74d0d4af4c
equal deleted inserted replaced
3:41300fa6a67c 4:3b1da2848fc7
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     8 **
     8 **
   143     return img;
   143     return img;
   144 }
   144 }
   145 
   145 
   146 void QS60WindowSurface::flush(QWidget *widget, const QRegion &region, const QPoint &)
   146 void QS60WindowSurface::flush(QWidget *widget, const QRegion &region, const QPoint &)
   147 {
   147 {
   148     const QVector<QRect> subRects = region.rects();
   148     QWExtra *extra = widget->d_func()->extraData();
   149     for (int i = 0; i < subRects.count(); ++i) {
   149     if (extra && !extra->inExpose) {
   150         TRect tr = qt_QRect2TRect(subRects[i]);
   150         extra->inExpose = true; // Prevent DrawNow() from calling syncBackingStore() again
       
   151         TRect tr = qt_QRect2TRect(region.boundingRect());
   151         widget->winId()->DrawNow(tr);
   152         widget->winId()->DrawNow(tr);
       
   153         extra->inExpose = false;
   152     }
   154     }
   153 }
   155 }
   154 
   156 
   155 bool QS60WindowSurface::scroll(const QRegion &area, int dx, int dy)
   157 bool QS60WindowSurface::scroll(const QRegion &area, int dx, int dy)
   156 {
   158 {