X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c02ee97f963f584179a54b50338c550a1057dd2e..30a72e62977e4c532ae2f265db72535a5cccbbab:/src/common/popupcmn.cpp?ds=sidebyside diff --git a/src/common/popupcmn.cpp b/src/common/popupcmn.cpp index 8f7215b235..604714fe7f 100644 --- a/src/common/popupcmn.cpp +++ b/src/common/popupcmn.cpp @@ -337,7 +337,11 @@ void wxPopupWindowHandler::OnLeftDown(wxMouseEvent& event) void wxPopupFocusHandler::OnKillFocus(wxFocusEvent& event) { // when we lose focus we always disappear - m_popup->DismissAndNotify(); + + // But if m_popup was about to get the focus, + // don't disappear. + if (event.GetWindow() != m_popup) + m_popup->DismissAndNotify(); } #endif // wxUSE_POPUPWIN