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:
@@ -156,6 +156,7 @@ static const EventTypeSpec eventList[] =
|
|||||||
{ kEventClassCommand, kEventProcessCommand } ,
|
{ kEventClassCommand, kEventProcessCommand } ,
|
||||||
{ kEventClassCommand, kEventCommandUpdateStatus } ,
|
{ kEventClassCommand, kEventCommandUpdateStatus } ,
|
||||||
|
|
||||||
|
{ kEventClassControl , kEventControlGetClickActivation } ,
|
||||||
{ kEventClassControl , kEventControlHit } ,
|
{ kEventClassControl , kEventControlHit } ,
|
||||||
|
|
||||||
{ kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } ,
|
{ kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } ,
|
||||||
@@ -350,6 +351,18 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
|
|||||||
result = thisWindow->MacControlHit( handler , event ) ;
|
result = thisWindow->MacControlHit( handler , event ) ;
|
||||||
break ;
|
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 :
|
default :
|
||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user