From c23b675f92a09e46ba578cb629c4df38c254f0bb Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 17 Jun 2009 21:26:35 +0000 Subject: [PATCH] Don't use wxMacMLTEHIViewControl for single-line text controls in non-Core Graphics mode since it doesn't refresh borders properly even on 10.5 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@61098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/textctrl.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 2d3c7c1100..98239ee2d6 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -425,7 +425,15 @@ void wxTextCtrl::CreatePeer( if ( UMAGetSystemVersion() >= 0x1030 && !forceMLTE ) { - if ( (m_windowStyle & wxTE_MULTILINE) || ( UMAGetSystemVersion() >= 0x1050 ) ) + // Non non-CG mode, borders are not refreshed properly when the focus + // leaves the text control, when using wxMacMLTEHIViewControl. + // This is still true on 10.5. + + if ( (m_windowStyle & wxTE_MULTILINE) +#if wxMAC_USE_CORE_GRAPHICS + || ( UMAGetSystemVersion() >= 0x1050 ) +#endif + ) m_peer = new wxMacMLTEHIViewControl( this , str , pos , size , style ) ; }