if ( highlighted )
#ifdef __WXMAC__
{
- if (m_owner->HasFocus())
+ if (m_owner->HasFocus()
+#ifdef __WXMAC__
+ && IsControlActive( (ControlRef)m_owner->GetHandle() )
+#endif
+ )
colText = *wxWHITE;
else
colText = *wxBLACK;
if (highlighted)
{
int flags = wxCONTROL_SELECTED;
- if (m_owner->HasFocus())
+ if (m_owner->HasFocus()
+#ifdef __WXMAC__
+ && IsControlActive( (ControlRef)m_owner->GetHandle() )
+#endif
+ )
flags |= wxCONTROL_FOCUSED;
wxRendererNative::Get().DrawItemSelectionRect( m_owner, *dc, m_gi->m_rectHighlight, flags );
if (highlighted)
{
int flags = wxCONTROL_SELECTED;
- if (m_owner->HasFocus())
+ if (m_owner->HasFocus()
+#ifdef __WXMAC__
+ && IsControlActive( (ControlRef)m_owner->GetHandle() )
+#endif
+ )
flags |= wxCONTROL_FOCUSED;
wxRendererNative::Get().DrawItemSelectionRect( m_owner, *dc, rectHL, flags );
}
else
{
int flags = wxCONTROL_SELECTED;
- if (m_hasFocus)
+ if (m_hasFocus
+#ifdef __WXMAC__
+ && IsControlActive( (ControlRef)GetHandle() )
+#endif
+ )
flags |= wxCONTROL_FOCUSED;
if ((item == m_current) && (m_hasFocus))
flags |= wxCONTROL_CURRENT;
// rectangle, so we want to make sure that the text is visible
// against the normal background, not the highlightbackground, so
// don't use the highlight text colour unless we have the focus.
- && m_hasFocus
+ && m_hasFocus && IsControlActive( (ControlRef)GetHandle() )
#endif
)
{
#include "wx/layout.h"
#include "wx/statusbr.h"
#include "wx/menuitem.h"
+ #include "wx/treectrl.h"
+ #include "wx/listctrl.h"
#endif
#include "wx/tooltip.h"
{ kEventClassControl , kEventControlVisibilityChanged } ,
{ kEventClassControl , kEventControlEnabledStateChanged } ,
{ kEventClassControl , kEventControlHiliteChanged } ,
+
+ { kEventClassControl , kEventControlActivate } ,
+ { kEventClassControl , kEventControlDeactivate } ,
#endif
{ kEventClassControl , kEventControlSetFocusPart } ,
case kEventControlHiliteChanged :
thisWindow->MacHiliteChanged() ;
break ;
+
+ case kEventControlActivate :
+ case kEventControlDeactivate :
+ if ( thisWindow->IsKindOf( CLASSINFO( wxTreeCtrl ) )
+ || thisWindow->IsKindOf( CLASSINFO( wxListCtrl ) )
+ )
+ thisWindow->Refresh();
+
+ //thisWindow->MacActivateStateChanged() ;
+ break ;
#endif
// we emulate this event under Carbon CFM