fix to always have a proper activation for DataBrowser controls (stay in bkgnd otherwise) bug 1621547

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2006-12-28 16:08:38 +00:00
parent 99a7bebb65
commit e9a4bf7ddc

View File

@ -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<WindowRef>(kEventParamWindowRef);
if ( !IsWindowActive(owner) )
{
cEvent.SetParameter(kEventParamClickActivation,(UInt32) kActivateAndIgnoreClick) ;
result = noErr ;
}
}
break ;
default :
break ;
}