diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index f4e4f26dbd..5764a89abf 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -156,6 +156,7 @@ static const EventTypeSpec eventList[] = { kEventClassCommand, kEventProcessCommand } , { kEventClassCommand, kEventCommandUpdateStatus } , + { kEventClassControl , kEventControlGetClickActivation } , { kEventClassControl , kEventControlHit } , { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } , @@ -350,6 +351,18 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl result = thisWindow->MacControlHit( handler , event ) ; break ; + case kEventControlGetClickActivation : + { + // fix to always have a proper activation for DataBrowser controls (stay in bkgnd otherwise) + WindowRef owner = cEvent.GetParameter(kEventParamWindowRef); + if ( !IsWindowActive(owner) ) + { + cEvent.SetParameter(kEventParamClickActivation,(UInt32) kActivateAndIgnoreClick) ; + result = noErr ; + } + } + break ; + default : break ; }