From 31ad2c402c0c626401bbb5b015001c6193cc0bf1 Mon Sep 17 00:00:00 2001 From: Michael Wetherell Date: Wed, 10 Aug 2005 19:41:01 +0000 Subject: [PATCH] Undo r1.52 since we get another problem. http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?5:sss:65211:200508:khmgllhgjjgnfkhpebip#b git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/popupcmn.cpp | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/common/popupcmn.cpp b/src/common/popupcmn.cpp index cec606e52e..5150d08a04 100644 --- a/src/common/popupcmn.cpp +++ b/src/common/popupcmn.cpp @@ -67,7 +67,6 @@ class wxPopupWindowHandler : public wxEvtHandler { public: wxPopupWindowHandler(wxPopupTransientWindow *popup) : m_popup(popup) {} - ~wxPopupWindowHandler(); protected: // event handlers @@ -84,7 +83,6 @@ class wxPopupFocusHandler : public wxEvtHandler { public: wxPopupFocusHandler(wxPopupTransientWindow *popup) : m_popup(popup) {} - ~wxPopupFocusHandler(); protected: void OnKillFocus(wxFocusEvent& event); @@ -274,16 +272,6 @@ void wxPopupTransientWindow::Popup(wxWindow *winFocus) m_focus->PushEventHandler(m_handlerFocus); } - - // 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); - if (m_focus) - m_focus->Connect(wxEVT_DESTROY, - wxWindowDestroyEventHandler(wxPopupTransientWindow::OnDestroy), - NULL, this); } bool wxPopupTransientWindow::Show( bool show ) @@ -380,14 +368,6 @@ bool wxPopupTransientWindow::ProcessLeftDown(wxMouseEvent& WXUNUSED(event)) return false; } -void wxPopupTransientWindow::OnDestroy(wxWindowDestroyEvent& event) -{ - if (event.GetEventObject() == m_child) - m_child = NULL; - if (event.GetEventObject() == m_focus) - m_focus = NULL; -} - #ifdef __WXMSW__ void wxPopupTransientWindow::OnIdle(wxIdleEvent& event) { @@ -474,11 +454,6 @@ void wxPopupComboWindow::OnKeyDown(wxKeyEvent& event) // ---------------------------------------------------------------------------- // wxPopupWindowHandler // ---------------------------------------------------------------------------- -wxPopupWindowHandler::~wxPopupWindowHandler() -{ - if (m_popup && (m_popup->m_handlerPopup == this)) - m_popup->m_handlerPopup = NULL; -} void wxPopupWindowHandler::OnLeftDown(wxMouseEvent& event) { @@ -567,11 +542,6 @@ void wxPopupWindowHandler::OnLeftDown(wxMouseEvent& event) // ---------------------------------------------------------------------------- // wxPopupFocusHandler // ---------------------------------------------------------------------------- -wxPopupFocusHandler::~wxPopupFocusHandler() -{ - if (m_popup && (m_popup->m_handlerFocus == this)) - m_popup->m_handlerFocus = NULL; -} void wxPopupFocusHandler::OnKillFocus(wxFocusEvent& event) { -- 2.45.2