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:
@@ -520,7 +520,17 @@ pascal OSStatus wxMacAppEventHandler( EventHandlerCallRef handler , EventRef eve
|
|||||||
result = wxMacAppMenuEventHandler( handler , event , data ) ;
|
result = wxMacAppMenuEventHandler( handler , event , data ) ;
|
||||||
break ;
|
break ;
|
||||||
case kEventClassMouse :
|
case kEventClassMouse :
|
||||||
|
{
|
||||||
|
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 ) ;
|
result = wxMacTopLevelMouseEventHandler( handler , event , NULL ) ;
|
||||||
|
}
|
||||||
break ;
|
break ;
|
||||||
case kEventClassAppleEvent :
|
case kEventClassAppleEvent :
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user