X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6feb95a79834836e88143b15d9f424ebe79621..6cc687bfee071b5328f9e48d1708795287006bb7:/src/generic/caret.cpp?ds=sidebyside

diff --git a/src/generic/caret.cpp b/src/generic/caret.cpp
index 8110dea83b..d199e5290f 100644
--- a/src/generic/caret.cpp
+++ b/src/generic/caret.cpp
@@ -91,7 +91,7 @@ void wxCaretBase::SetBlinkTime(int milliseconds)
 void wxCaret::InitGeneric()
 {
     m_hasFocus = TRUE;
-    m_blinkedOut = FALSE;
+    m_blinkedOut = TRUE;
 
     m_xOld =
     m_yOld = -1;
@@ -118,8 +118,8 @@ void wxCaret::DoShow()
     if ( blinkTime )
         m_timer.Start(blinkTime);
 
-    m_blinkedOut = TRUE;
-    Blink();
+    if ( m_blinkedOut )
+        Blink();
 }
 
 void wxCaret::DoHide()
@@ -158,7 +158,8 @@ void wxCaret::OnSetFocus()
 {
     m_hasFocus = TRUE;
 
-    Refresh();
+    if ( IsVisible() )
+        Refresh();
 }
 
 void wxCaret::OnKillFocus()