- m_focus->Connect(wxEVT_DESTROY,
- wxWindowDestroyEventHandler(wxPopupTransientWindow::OnDestroy),
- NULL, this);
-#ifdef __WXMSW__
- // Assume that the mouse is currently outside of the popup window
- CaptureMouse();
-
- // Connect the child Enter/Leave events too, incase the child completly
- // covers the popup (because then the popup's enter/leave events won't be
- // sent.
- if (m_child != this)
- {
- m_child->Connect(wxEVT_ENTER_WINDOW,
- wxMouseEventHandler(wxPopupTransientWindow::OnChildEnter),
+ if (m_focus)
+ m_focus->Connect(wxEVT_DESTROY,
+ wxWindowDestroyEventHandler(wxPopupTransientWindow::OnDestroy),