// the origin point must be in screen coords
wxPoint ptOrigin = m_combo->ClientToScreen(wxPoint(0, 0));
// the origin point must be in screen coords
wxPoint ptOrigin = m_combo->ClientToScreen(wxPoint(0, 0));
// account for the fact that (0, 0) is not the top left corner of the
// window: there is also the border
wxRect rectBorders = m_combo->GetRenderer()->
// account for the fact that (0, 0) is not the top left corner of the
// window: there is also the border
wxRect rectBorders = m_combo->GetRenderer()->
- m_popup->DismissAndNotify();
+
+ // But if m_popup was about to get the focus,
+ // don't disappear.
+ if (event.GetWindow() != m_popup)
+ m_popup->DismissAndNotify();