git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51644
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxControlContainer::HandleOnNavigationKey( wxNavigationKeyEvent& event )
{
- wxWindow *parent = m_winParent->GetParent();
+ // for a TLW we shouldn't involve the parent window, it has nothing to do
+ // with keyboard navigation inside this TLW
+ wxWindow *parent = m_winParent->IsTopLevel() ? NULL
+ : m_winParent->GetParent();
// the event is propagated downwards if the event emitter was our parent
bool goingDown = event.GetEventObject() == parent;