From: Stefan Csomor Date: Tue, 31 Aug 2004 18:54:24 +0000 (+0000) Subject: fix for not sending a native click to a control if it is not enabled (does an enable... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7ce1a4e1cd7f41e30c0bfd8cbcbecf2f2484153a?hp=c4c3e30f2eb4b6771869d1661c32e0b732a6874a 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 --- diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 597b6caa9a..714293fc36 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -535,13 +535,16 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev (FindControlUnderMouse(windowMouseLocation , window , &dummyPart) != wxMacFindControlUnderMouse( windowMouseLocation , window , &dummyPart ) ) ) { - EventModifiers modifiers = cEvent.GetParameter(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(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 ; } }