mouse handling fixed, skipping if we have no native control handling

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2004-03-28 07:18:48 +00:00
parent d3e780ecdf
commit 39a7aa0467

View File

@@ -2564,7 +2564,6 @@ void wxWindowMac::OnMouseEvent( wxMouseEvent &event )
x += origin.x ;
y += origin.y ;
}
ControlRef control ;
Point localwhere ;
SInt16 controlpart ;
@@ -2587,20 +2586,21 @@ void wxWindowMac::OnMouseEvent( wxMouseEvent &event )
if ( event.m_metaDown )
modifiers |= cmdKey ;
bool handled = false ;
if ( ::IsControlActive( (ControlRef) m_macControl ) )
{
control = (ControlRef) m_macControl ;
if ( control && ::IsControlActive( control ) )
{
{
controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) -1 ) ;
controlpart = ::HandleControlClick( (ControlRef) m_macControl , localwhere , modifiers , (ControlActionUPP) -1 ) ;
wxTheApp->s_lastMouseDown = 0 ;
if ( control && controlpart != kControlNoPart )
if ( controlpart != kControlNoPart )
{
MacHandleControlClick((WXWidget) control , controlpart , false /* mouse not down anymore */ ) ;
}
}
MacHandleControlClick((WXWidget) (ControlRef) m_macControl , controlpart , false /* mouse not down anymore */ ) ;
handled = true ;
}
}
if ( !handled )
event.Skip() ;
}
else
{