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:
Stefan Csomor 2004-08-31 18:54:24 +00:00
parent c4c3e30f2e
commit 7ce1a4e1cd

View File

@ -534,6 +534,8 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev
if ( ( cEvent.GetKind() == kEventMouseDown ) && if ( ( cEvent.GetKind() == kEventMouseDown ) &&
(FindControlUnderMouse(windowMouseLocation , window , &dummyPart) != (FindControlUnderMouse(windowMouseLocation , window , &dummyPart) !=
wxMacFindControlUnderMouse( windowMouseLocation , window , &dummyPart ) ) ) wxMacFindControlUnderMouse( windowMouseLocation , window , &dummyPart ) ) )
{
if ( currentMouseWindow->MacIsReallyEnabled() )
{ {
EventModifiers modifiers = cEvent.GetParameter<EventModifiers>(kEventParamKeyModifiers, typeUInt32) ; EventModifiers modifiers = cEvent.GetParameter<EventModifiers>(kEventParamKeyModifiers, typeUInt32) ;
Point clickLocation = windowMouseLocation ; Point clickLocation = windowMouseLocation ;
@ -542,6 +544,7 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev
#endif #endif
HandleControlClick( (ControlRef) currentMouseWindow->GetHandle() , clickLocation , HandleControlClick( (ControlRef) currentMouseWindow->GetHandle() , clickLocation ,
modifiers , (ControlActionUPP ) -1 ) ; modifiers , (ControlActionUPP ) -1 ) ;
}
result = noErr ; result = noErr ;
} }
} }