summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_s60.cpp
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2010-01-14 09:44:24 (GMT)
committerJason Barron <jbarron@trolltech.com>2010-01-14 14:34:50 (GMT)
commitbc82db4d08860735bbae584a54d1b591c760e38b (patch)
tree1b01fc4c0453671f00e1a07f6e4a3ca13e64e259 /src/gui/kernel/qapplication_s60.cpp
parent862d5433fb694a03715b2327a107b3192b921924 (diff)
downloadQt-bc82db4d08860735bbae584a54d1b591c760e38b.zip
Qt-bc82db4d08860735bbae584a54d1b591c760e38b.tar.gz
Qt-bc82db4d08860735bbae584a54d1b591c760e38b.tar.bz2
Improve the behavior of expose events on Symbian.
Previously when an expose was received from WSERV, we simply called BitBlt (for raster) or called flush on the window surface (for anything else). This behavior differs from other platforms which call syncBackingStore(). This difference means that we flush the backing store without actually updating the content first. This works for most cases because if there actually was new content, it would be updated when the widget's UpdateRequest event was handled. The problem arises when the backing store does not have the correct content. This can happen if the backing store was deleted, but only partially restored (see Task below). Another problem is with the OpenVG graphics system which assumes that beginPaint() is called before endPaint() is order to initialize the context and the surface size. The fix is to call syncBackingStore() like the other platforms, but introduce a bit field to prevent infinite recursion in the painting pipeline. Task-number: QTBUG-4921 Reviewed-by: axis Reviewed-by: Gareth Stockwell
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 3ee0a71..8c77728 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -807,6 +807,15 @@ TCoeInputCapabilities QSymbianControl::InputCapabilities() const
void QSymbianControl::Draw(const TRect& controlRect) const
{
+ // Set flag to avoid calling DrawNow in window surface
+ QWExtra *extra = qwidget->d_func()->extraData();
+ if (extra && !extra->inExpose) {
+ extra->inExpose = true;
+ QRect exposeRect = qt_TRect2QRect(controlRect);
+ qwidget->d_func()->syncBackingStore(exposeRect);
+ extra->inExpose = false;
+ }
+
QWindowSurface *surface = qwidget->windowSurface();
QPaintEngine *engine = surface ? surface->paintDevice()->paintEngine() : NULL;
@@ -855,8 +864,6 @@ void QSymbianControl::Draw(const TRect& controlRect) const
default:
Q_ASSERT(false);
}
- } else {
- surface->flush(qwidget, QRegion(qt_TRect2QRect(backingStoreRect)), QPoint());
}
if (sendNativePaintEvents) {