diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index f1c05f9aec..2b2c0b892c 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -520,7 +520,17 @@ pascal OSStatus wxMacAppEventHandler( EventHandlerCallRef handler , EventRef eve result = wxMacAppMenuEventHandler( handler , event , data ) ; break ; case kEventClassMouse : - result = wxMacTopLevelMouseEventHandler( handler , event , NULL ) ; + { + wxMacCarbonEvent cEvent( event ) ; + + WindowRef window ; + Point screenMouseLocation = cEvent.GetParameter(kEventParamMouseLocation) ; + short windowPart = ::FindWindow(screenMouseLocation, &window); + // only send this event in case it had not already been sent to a tlw, as we get + // double events otherwise (in case event.skip) was called + if ( window == NULL ) + result = wxMacTopLevelMouseEventHandler( handler , event , NULL ) ; + } break ; case kEventClassAppleEvent : {