diff options
author | Jason Barron <jason.barron@nokia.com> | 2010-12-29 17:15:03 (GMT) |
---|---|---|
committer | Jani Hautakangas <jani.hautakangas@nokia.com> | 2010-12-29 17:15:03 (GMT) |
commit | ef96a142f790152524248b4dd0f24e3126ef871e (patch) | |
tree | 9245f3d7551588e80cc35966dafc135cf7cd5627 /src/gui/kernel | |
parent | 08f963176b24c4c20a96717ddb2241ba1410b0a1 (diff) | |
download | Qt-ef96a142f790152524248b4dd0f24e3126ef871e.zip Qt-ef96a142f790152524248b4dd0f24e3126ef871e.tar.gz Qt-ef96a142f790152524248b4dd0f24e3126ef871e.tar.bz2 |
Clear WSERV content when a native child receives an "expose"
Native child windows on Symbian can cause composition artifacts on S^3
because they own a visible RWindow instance, but the RWindow
technically has no content because child windows paint their content to
their parent's backing store. In the event that a native child widget
completely obscures a top level, the composition engine does not
understand that the child is "empty" and should clear the UI surface
to let the top level "shine through". The result is that articacts can
remain on the UI surface after a transition from a WSERV drawing app to
a Qt (EGL rendering) app.
To fix this issue, we call CWindowGc::Clear() when the native child
widget receives an "expose" event. This clears the UI surface content
and ensures the top level is visible even though it is technically
below another RWindow.
Task-number: QTMOBILITY-484
Reviewed-by: Jani Hautakangas
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 181fcc7..691c02a 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1071,6 +1071,14 @@ void QSymbianControl::Draw(const TRect& controlRect) const Q_ASSERT(topExtra); if (!topExtra->inExpose) { topExtra->inExpose = true; + if (!qwidget->isWindow()) { + // If we get here, then it means we have a native child window + // Since no content should ever be painted to these windows, we + // erase them with a transparent brush when they get an expose. + CWindowGc &gc = SystemGc(); + gc.SetBrushColor(TRgb(0, 0, 0, 0)); + gc.Clear(controlRect); + } QRect exposeRect = qt_TRect2QRect(controlRect); qwidget->d_func()->syncBackingStore(exposeRect); topExtra->inExpose = false; |