git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14264
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// 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)