node = node->GetNext();
#ifdef __WXMAC__
- wxScrollBar *sb = wxDynamicCast( child , wxScrollBar ) ;
- if ( sb == NULL || !m_winParent->MacIsWindowScrollbar( sb ) )
- hasRealChildren = true ;
- if ( sb && m_winParent->MacIsWindowScrollbar( sb ) )
+ if ( m_winParent->MacIsWindowScrollbar( child ) )
continue;
+ hasRealChildren = true ;
#endif
if ( child->AcceptsFocus() )
{
}
}
- if ( bookctrl && bookctrl->GetEventHandler()->ProcessEvent(event) )
- return;
+ if ( bookctrl )
+ {
+ // make sure that we don't bubble up the event again from the book
+ // control resulting in infinite recursion
+ wxNavigationKeyEvent eventCopy(event);
+ eventCopy.SetEventObject(m_winParent);
+ if ( bookctrl->GetEventHandler()->ProcessEvent(eventCopy) )
+ return;
+ }
}
// there is not much to do if we don't have children and we're not
node = node->GetNext();
#ifdef __WXMAC__
- wxScrollBar *sb = wxDynamicCast( child , wxScrollBar ) ;
- if ( sb && child->GetParent()->MacIsWindowScrollbar( sb ) )
+ if ( child->GetParent()->MacIsWindowScrollbar( child ) )
continue;
#endif