]> git.saurik.com Git - wxWidgets.git/commitdiff
hide the caret before setting m_updateRegion: produces small flicker, but works
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 21 Sep 2006 10:13:42 +0000 (10:13 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 21 Sep 2006 10:13:42 +0000 (10:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/dfb/window.cpp

index 0e78f4b1745266c2ecba55e91e3eb2a42b522965..cb130386537a96dab4d33e9561b1e409b80f3027 100644 (file)
@@ -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();