hide the caret before setting m_updateRegion: produces small flicker, but works
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -683,15 +683,19 @@ void wxWindowDFB::PaintWindow(const wxRect& rect)
|
||||
this, GetName().c_str(),
|
||||
rect.x, rect.y, rect.GetRight(), rect.GetBottom());
|
||||
|
||||
m_updateRegion = rect;
|
||||
|
||||
#if wxUSE_CARET
|
||||
// FIXME: we're doing this before setting m_updateRegion because wxDFB
|
||||
// clips all DCs for this window to it, but this results in flicker,
|
||||
// it should be fixed by using overlays for the caret
|
||||
|
||||
// must hide caret temporarily, otherwise we'd get rendering artifacts
|
||||
wxCaret *caret = GetCaret();
|
||||
if ( caret )
|
||||
caret->Hide();
|
||||
#endif // wxUSE_CARET
|
||||
|
||||
m_updateRegion = rect;
|
||||
|
||||
// FIXME_DFB: don't waste time rendering the area if it's fully covered
|
||||
// by some children, go directly to rendering the children
|
||||
|
||||
@@ -730,13 +734,15 @@ void wxWindowDFB::PaintWindow(const wxRect& rect)
|
||||
this, GetName().c_str());
|
||||
}
|
||||
|
||||
m_updateRegion.Clear();
|
||||
|
||||
#if wxUSE_CARET
|
||||
// FIXME: this should be ideally done before m_updateRegion.Clear() or not
|
||||
// at all, see the comment where the caret is hidden
|
||||
if ( caret )
|
||||
caret->Show();
|
||||
#endif // wxUSE_CARET
|
||||
|
||||
m_updateRegion.Clear();
|
||||
|
||||
// paint the children:
|
||||
wxPoint origin = GetClientAreaOrigin();
|
||||
wxWindowList& children = GetChildren();
|
||||
|
Reference in New Issue
Block a user