Generic list and tree ctrl should not use the focused selection color when the top level window is not active.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier
2007-01-07 01:15:20 +00:00
parent 3d7a1b394b
commit ed9a7a63b8
3 changed files with 36 additions and 5 deletions

View File

@@ -33,6 +33,8 @@
#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"
@@ -167,6 +169,9 @@ static const EventTypeSpec eventList[] =
{ kEventClassControl , kEventControlVisibilityChanged } ,
{ kEventClassControl , kEventControlEnabledStateChanged } ,
{ kEventClassControl , kEventControlHiliteChanged } ,
{ kEventClassControl , kEventControlActivate } ,
{ kEventClassControl , kEventControlDeactivate } ,
#endif
{ kEventClassControl , kEventControlSetFocusPart } ,
@@ -294,6 +299,16 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
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