]> git.saurik.com Git - wxWidgets.git/commitdiff
don't use parent window of a TLW in HandleOnNavigationKey(), even if it's apparently...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 11 Feb 2008 00:09:24 +0000 (00:09 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 11 Feb 2008 00:09:24 +0000 (00:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/containr.cpp

index d441b5c7c469e30d08e690437f460c9889359af4..c0156165dda141bc564a1709e9240b391561d08b 100644 (file)
@@ -316,7 +316,10 @@ wxRadioButton* wxGetSelectedButtonInGroup(wxRadioButton *btn)
 
 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;