]> git.saurik.com Git - wxWidgets.git/commitdiff
Workaround for #15404: wxRichTextCtrl: caret does not disappear when focus is lost...
authorJulian Smart <julian@anthemion.co.uk>
Sat, 14 Sep 2013 20:46:43 +0000 (20:46 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 14 Sep 2013 20:46:43 +0000 (20:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextctrl.cpp

index 69151389e1e1145a1fc3087121ab918cf8f54e0e..e29da0ba904d45ba7786b8f9a280f8ae90e8ddc9 100644 (file)
@@ -4885,6 +4885,15 @@ void wxRichTextCaret::DoDraw(wxDC *dc)
 
 void wxRichTextCaret::Notify()
 {
+#ifdef __WXMAC__
+    // Workaround for lack of kill focus event in wxOSX
+    if (m_richTextCtrl && !m_richTextCtrl->HasFocus())
+    {
+        Hide();
+        return;
+    }
+#endif
+
     m_flashOn = !m_flashOn;
     Refresh();
 }