{
int x , y ;
wxSize size ;
- if ( parent->IsTopLevel() && child->IsKindOf( CLASSINFO( wxToolBar ) ) )
+ // we have to find a better clipping algorithm here, in order not to clip things
+ // positioned like status and toolbar
+ if ( 1 /* parent->IsTopLevel() && child->IsKindOf( CLASSINFO( wxToolBar ) ) */ )
{
size = parent->GetSize() ;
x = y = 0 ;
x += origin.x ;
y += origin.y ;
}
- ControlRef control ;
Point localwhere ;
SInt16 controlpart ;
if ( event.m_metaDown )
modifiers |= cmdKey ;
+
+ bool handled = false ;
+
+ if ( ::IsControlActive( (ControlRef) m_macControl ) )
{
- control = (ControlRef) m_macControl ;
- if ( control && ::IsControlActive( control ) )
+ controlpart = ::HandleControlClick( (ControlRef) m_macControl , localwhere , modifiers , (ControlActionUPP) -1 ) ;
+ wxTheApp->s_lastMouseDown = 0 ;
+ if ( controlpart != kControlNoPart )
{
- {
- controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) -1 ) ;
- wxTheApp->s_lastMouseDown = 0 ;
- if ( control && 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
{