fix for not sending a native click to a control if it is not enabled (does an enable itself)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
c4c3e30f2e
commit
7ce1a4e1cd
@ -535,13 +535,16 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev
|
||||
(FindControlUnderMouse(windowMouseLocation , window , &dummyPart) !=
|
||||
wxMacFindControlUnderMouse( windowMouseLocation , window , &dummyPart ) ) )
|
||||
{
|
||||
EventModifiers modifiers = cEvent.GetParameter<EventModifiers>(kEventParamKeyModifiers, typeUInt32) ;
|
||||
Point clickLocation = windowMouseLocation ;
|
||||
#if TARGET_API_MAC_OSX
|
||||
currentMouseWindow->MacRootWindowToWindow( &clickLocation.h , &clickLocation.v ) ;
|
||||
#endif
|
||||
HandleControlClick( (ControlRef) currentMouseWindow->GetHandle() , clickLocation ,
|
||||
modifiers , (ControlActionUPP ) -1 ) ;
|
||||
if ( currentMouseWindow->MacIsReallyEnabled() )
|
||||
{
|
||||
EventModifiers modifiers = cEvent.GetParameter<EventModifiers>(kEventParamKeyModifiers, typeUInt32) ;
|
||||
Point clickLocation = windowMouseLocation ;
|
||||
#if TARGET_API_MAC_OSX
|
||||
currentMouseWindow->MacRootWindowToWindow( &clickLocation.h , &clickLocation.v ) ;
|
||||
#endif
|
||||
HandleControlClick( (ControlRef) currentMouseWindow->GetHandle() , clickLocation ,
|
||||
modifiers , (ControlActionUPP ) -1 ) ;
|
||||
}
|
||||
result = noErr ;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user