Added code to set m_isBeingDeleted as per wxGTK

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Michael Bedward
1999-08-02 06:00:17 +00:00
parent 913df6f2e0
commit 3ab377bd1a
3 changed files with 8 additions and 1 deletions

View File

@@ -258,6 +258,8 @@ void wxDialog::SetModal(bool flag)
wxDialog::~wxDialog() wxDialog::~wxDialog()
{ {
m_isBeingDeleted = TRUE;
if (m_mainWidget) if (m_mainWidget)
XtRemoveEventHandler((Widget) m_mainWidget, ExposureMask, FALSE, XtRemoveEventHandler((Widget) m_mainWidget, ExposureMask, FALSE,
wxUniversalRepaintProc, (XtPointer) this); wxUniversalRepaintProc, (XtPointer) this);

View File

@@ -300,6 +300,8 @@ bool wxFrame::Create(wxWindow *parent,
wxFrame::~wxFrame() wxFrame::~wxFrame()
{ {
m_isBeingDeleted = TRUE;
if (m_clientArea) if (m_clientArea)
XtRemoveEventHandler((Widget) m_clientArea, ExposureMask, FALSE, XtRemoveEventHandler((Widget) m_clientArea, ExposureMask, FALSE,
wxUniversalRepaintProc, (XtPointer) this); wxUniversalRepaintProc, (XtPointer) this);

View File

@@ -183,6 +183,7 @@ void wxWindow::Init()
m_winCaptured = FALSE; m_winCaptured = FALSE;
m_isShown = TRUE; m_isShown = TRUE;
m_isBeingDeleted = FALSE;
m_hScrollBar = m_hScrollBar =
m_vScrollBar = m_vScrollBar =
@@ -360,6 +361,8 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
// Destructor // Destructor
wxWindow::~wxWindow() wxWindow::~wxWindow()
{ {
m_isBeingDeleted = TRUE;
// Motif-specific actions first // Motif-specific actions first
WXWidget wMain = GetMainWidget(); WXWidget wMain = GetMainWidget();
if ( wMain ) if ( wMain )