From 224175a56438939394711e0964cf2636e8804e0e Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 21 Sep 2006 10:13:42 +0000 Subject: [PATCH] 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 --- src/dfb/window.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/dfb/window.cpp b/src/dfb/window.cpp index 0e78f4b174..cb13038653 100644 --- a/src/dfb/window.cpp +++ b/src/dfb/window.cpp @@ -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(); -- 2.47.2