correcting a source for double event delivery

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2004-08-30 07:40:19 +00:00
parent 6574f2b143
commit 95a8b77a94

View 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 :
{