diff options
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index d50e7e1..af9fe92 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -780,7 +780,7 @@ TCoeInputCapabilities QSymbianControl::InputCapabilities() const } #endif -void QSymbianControl::Draw(const TRect& r) const +void QSymbianControl::Draw(const TRect& controlRect) const { QWindowSurface *surface = qwidget->windowSurface(); QPaintEngine *engine = surface ? surface->paintDevice()->paintEngine() : NULL; @@ -788,6 +788,11 @@ void QSymbianControl::Draw(const TRect& r) const if (!engine) return; + // Map source rectangle into coordinates of the backing store. + const QPoint controlBase(controlRect.iTl.iX, controlRect.iTl.iY); + const QPoint backingStoreBase = qwidget->mapTo(qwidget->window(), controlBase); + const TRect backingStoreRect(TPoint(backingStoreBase.x(), backingStoreBase.y()), controlRect.Size()); + if (engine->type() == QPaintEngine::Raster) { QS60WindowSurface *s60Surface = static_cast<QS60WindowSurface *>(qwidget->windowSurface()); CFbsBitmap *bitmap = s60Surface->symbianBitmap(); @@ -796,10 +801,10 @@ void QSymbianControl::Draw(const TRect& r) const if(!qwidget->d_func()->extraData()->disableBlit) { if (qwidget->d_func()->isOpaque) gc.SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha); - gc.BitBlt(r.iTl, bitmap, r); - } + gc.BitBlt(controlRect.iTl, bitmap, backingStoreRect); + } } else { - surface->flush(qwidget, QRegion(qt_TRect2QRect(r)), QPoint()); + surface->flush(qwidget, QRegion(qt_TRect2QRect(backingStoreRect)), QPoint()); } } |