]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/app.cpp
added As/DissociateHandle() and implemented it for MSW (modified patch 972356)
[wxWidgets.git] / src / mac / carbon / app.cpp
index f1c05f9aecc75376c9f5861b04f11dc0267389fb..2b2c0b892cb770f06a6bf8b9fd3ab88f35c1b2bb 100644 (file)
@@ -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<Point>(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 :
             {