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:
@@ -2564,7 +2564,6 @@ void wxWindowMac::OnMouseEvent( wxMouseEvent &event )
|
|||||||
x += origin.x ;
|
x += origin.x ;
|
||||||
y += origin.y ;
|
y += origin.y ;
|
||||||
}
|
}
|
||||||
ControlRef control ;
|
|
||||||
Point localwhere ;
|
Point localwhere ;
|
||||||
SInt16 controlpart ;
|
SInt16 controlpart ;
|
||||||
|
|
||||||
@@ -2587,20 +2586,21 @@ void wxWindowMac::OnMouseEvent( wxMouseEvent &event )
|
|||||||
|
|
||||||
if ( event.m_metaDown )
|
if ( event.m_metaDown )
|
||||||
modifiers |= cmdKey ;
|
modifiers |= cmdKey ;
|
||||||
|
|
||||||
|
bool handled = false ;
|
||||||
|
|
||||||
|
if ( ::IsControlActive( (ControlRef) m_macControl ) )
|
||||||
{
|
{
|
||||||
control = (ControlRef) m_macControl ;
|
controlpart = ::HandleControlClick( (ControlRef) m_macControl , localwhere , modifiers , (ControlActionUPP) -1 ) ;
|
||||||
if ( control && ::IsControlActive( control ) )
|
|
||||||
{
|
|
||||||
{
|
|
||||||
controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) -1 ) ;
|
|
||||||
wxTheApp->s_lastMouseDown = 0 ;
|
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
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user