summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp11
-rw-r--r--src/gui/kernel/qwidget_p.h1
-rw-r--r--src/gui/kernel/qwidget_s60.cpp1
3 files changed, 11 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) {
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index ec8d20f..b1eb3c3 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -229,6 +229,7 @@ struct QWExtra {
#endif
#elif defined(Q_OS_SYMBIAN) // <----------------------------------------------------- Symbian
uint activated : 1; // RWindowBase::Activated has been called
+ uint inExpose : 1; // Prevents drawing recursion
/**
* Defines the behaviour of QSymbianControl::Draw.
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index c65a162..4c0e21e 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -883,6 +883,7 @@ void QWidgetPrivate::createSysExtra()
extra->activated = 0;
extra->nativePaintMode = QWExtra::Default;
extra->receiveNativePaintEvents = 0;
+ extra->inExpose = 0;
}
void QWidgetPrivate::deleteSysExtra()