X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c2bc1e2abbbe6d6d276e8e0d8f603a3d8f1e823d..143318ddbb005602b600216cca621439b771f889:/src/mac/carbon/toplevel.cpp 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 ; } }