diff options
author | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-02-23 17:45:41 (GMT) |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-02-23 17:45:41 (GMT) |
commit | 615972e09981a0916422716b4f6572c6401789da (patch) | |
tree | 82203c15bceebd5426c823852ef5c85ad025e92b /src/gui/painting/qwindowsurface_s60.cpp | |
parent | 60fd302e8d88b92ade59d68872c99310128c3a6c (diff) | |
parent | de4332a4728e739b37e9c7b04c021e150e096270 (diff) | |
download | Qt-615972e09981a0916422716b4f6572c6401789da.zip Qt-615972e09981a0916422716b4f6572c6401789da.tar.gz Qt-615972e09981a0916422716b4f6572c6401789da.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1
Diffstat (limited to 'src/gui/painting/qwindowsurface_s60.cpp')
-rw-r--r-- | src/gui/painting/qwindowsurface_s60.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp index b41dc2c..028ec48 100644 --- a/src/gui/painting/qwindowsurface_s60.cpp +++ b/src/gui/painting/qwindowsurface_s60.cpp @@ -145,12 +145,23 @@ QImage* QS60WindowSurface::buffer(const QWidget *widget) void QS60WindowSurface::flush(QWidget *widget, const QRegion ®ion, const QPoint &) { - 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()); + QWidget *window = widget->window(); + 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(qr); widget->winId()->DrawNow(tr); - extra->inExpose = false; + 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(); } } |