]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/popupcmn.cpp
Added some notes on the Nano-X port.
[wxWidgets.git] / src / common / popupcmn.cpp
index dd72510c5fc420d9bc7938b72f6ec1b0028e20e7..c17d528fbfbd90923a7475f52ebca00b52f810b0 100644 (file)
@@ -418,8 +418,14 @@ void wxPopupFocusHandler::OnKillFocus(wxFocusEvent& event)
 
     // when we lose focus we always disappear - unless it goes to the popup (in
     // which case we don't really lose it)
-    if ( event.GetWindow() != m_popup )
-        m_popup->DismissAndNotify();
+    wxWindow *win = event.GetWindow();
+    while ( win )
+    {
+        if ( win == m_popup )
+            return;
+        win = win->GetParent();
+    }
+    m_popup->DismissAndNotify();
 }
 
 void wxPopupFocusHandler::OnKeyDown(wxKeyEvent& event)