]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/popupcmn.cpp
check for LVS_OWNERDATA availability at compile and run-time
[wxWidgets.git] / src / common / popupcmn.cpp
index 8f7215b23518965df163d7bf46ea3d173e8f2cd4..604714fe7f83a1fb0cd042adef0711e9c980f71c 100644 (file)
@@ -337,7 +337,11 @@ void wxPopupWindowHandler::OnLeftDown(wxMouseEvent& event)
 void wxPopupFocusHandler::OnKillFocus(wxFocusEvent& event)
 {
     // when we lose focus we always disappear
 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
 }
 
 #endif // wxUSE_POPUPWIN