From 36a56c6568bd29350a24f32bf5bbad0532a42a19 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 17 Feb 2002 00:03:08 +0000 Subject: [PATCH] don't treat changing focus to popup's child as loosing it git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/popupcmn.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/common/popupcmn.cpp b/src/common/popupcmn.cpp index dd72510c5f..c17d528fbf 100644 --- a/src/common/popupcmn.cpp +++ b/src/common/popupcmn.cpp @@ -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) -- 2.45.2