diff --git a/src/generic/caret.cpp b/src/generic/caret.cpp index 2be3938f6a..ff42b9e5c6 100644 --- a/src/generic/caret.cpp +++ b/src/generic/caret.cpp @@ -287,8 +287,16 @@ void wxCaret::DoDraw(wxDC *dc, wxWindow* win) brush = *wxWHITE_BRUSH; } } - dc->SetPen( pen ); - dc->SetBrush(m_hasFocus ? brush : *wxTRANSPARENT_BRUSH); + if (m_hasFocus) + { + dc->SetPen(*wxTRANSPARENT_PEN); + dc->SetBrush(brush); + } + else + { + dc->SetPen(pen); + dc->SetBrush(*wxTRANSPARENT_BRUSH); + } // VZ: unfortunately, the rectangle comes out a pixel smaller when this is // done under wxGTK - no idea why