no real changes; just streamlined ifdef around compositing check and removed redundant and never executing code to relay mouse enter/leave events to tooltips

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-03-04 21:28:39 +00:00
parent 9a6a4f6d57
commit f124c9086b

View File

@@ -561,9 +561,7 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev
// make tooltips current // make tooltips current
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS
if ( wxevent.GetEventType() == wxEVT_MOTION if ( wxevent.GetEventType() == wxEVT_MOTION )
|| wxevent.GetEventType() == wxEVT_ENTER_WINDOW
|| wxevent.GetEventType() == wxEVT_LEAVE_WINDOW )
wxToolTip::RelayEvent( currentMouseWindow , wxevent ); wxToolTip::RelayEvent( currentMouseWindow , wxevent );
#endif #endif
@@ -638,8 +636,8 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev
cursorPoint += cursorTarget->GetPosition(); cursorPoint += cursorTarget->GetPosition();
} }
} // else if ( currentMouseWindow ) }
else else // currentMouseWindow == NULL
{ {
// don't mess with controls we don't know about // don't mess with controls we don't know about
// for some reason returning eventNotHandledErr does not lead to the correct behaviour // for some reason returning eventNotHandledErr does not lead to the correct behaviour
@@ -648,17 +646,17 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev
{ {
EventModifiers modifiers = cEvent.GetParameter<EventModifiers>(kEventParamKeyModifiers, typeUInt32) ; EventModifiers modifiers = cEvent.GetParameter<EventModifiers>(kEventParamKeyModifiers, typeUInt32) ;
Point clickLocation = windowMouseLocation ; Point clickLocation = windowMouseLocation ;
#if TARGET_API_MAC_OSX
if ( toplevelWindow->MacUsesCompositing() ) if ( toplevelWindow->MacUsesCompositing() )
{ {
#ifdef __WXMAC_OSX__
HIPoint hiPoint ; HIPoint hiPoint ;
hiPoint.x = clickLocation.h ; hiPoint.x = clickLocation.h ;
hiPoint.y = clickLocation.v ; hiPoint.y = clickLocation.v ;
HIViewConvertPoint( &hiPoint , (ControlRef) toplevelWindow->GetHandle() , control ) ; HIViewConvertPoint( &hiPoint , (ControlRef) toplevelWindow->GetHandle() , control ) ;
clickLocation.h = (int)hiPoint.x ; clickLocation.h = (int)hiPoint.x ;
clickLocation.v = (int)hiPoint.y ; clickLocation.v = (int)hiPoint.y ;
#endif
} }
#endif // TARGET_API_MAC_OSX
HandleControlClick( control , clickLocation , modifiers , (ControlActionUPP ) -1 ) ; HandleControlClick( control , clickLocation , modifiers , (ControlActionUPP ) -1 ) ;
result = noErr ; result = noErr ;