- // catch destroy events, if you close a program with a popup shown in MSW
- // you get a segfault if m_child or m_focus are deleted before this is
- m_child->Connect(wxEVT_DESTROY,
- wxWindowDestroyEventHandler(wxPopupTransientWindow::OnDestroy),
- NULL, this);
- 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)