From 3ab377bd1ad4b6a2568cf1ac8b0f6e6b52a004d4 Mon Sep 17 00:00:00 2001 From: Michael Bedward Date: Mon, 2 Aug 1999 06:00:17 +0000 Subject: [PATCH] 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 --- src/motif/dialog.cpp | 2 ++ src/motif/frame.cpp | 2 ++ src/motif/window.cpp | 5 ++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/motif/dialog.cpp b/src/motif/dialog.cpp index 029f1f7924..712b2e5e66 100644 --- a/src/motif/dialog.cpp +++ b/src/motif/dialog.cpp @@ -258,6 +258,8 @@ void wxDialog::SetModal(bool flag) wxDialog::~wxDialog() { + m_isBeingDeleted = TRUE; + if (m_mainWidget) XtRemoveEventHandler((Widget) m_mainWidget, ExposureMask, FALSE, wxUniversalRepaintProc, (XtPointer) this); diff --git a/src/motif/frame.cpp b/src/motif/frame.cpp index aa411fcb42..121e0bae04 100644 --- a/src/motif/frame.cpp +++ b/src/motif/frame.cpp @@ -300,6 +300,8 @@ bool wxFrame::Create(wxWindow *parent, wxFrame::~wxFrame() { + m_isBeingDeleted = TRUE; + if (m_clientArea) XtRemoveEventHandler((Widget) m_clientArea, ExposureMask, FALSE, wxUniversalRepaintProc, (XtPointer) this); diff --git a/src/motif/window.cpp b/src/motif/window.cpp index 339540128b..f7ed6cb2bb 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -183,7 +183,8 @@ void wxWindow::Init() m_winCaptured = FALSE; m_isShown = TRUE; - + m_isBeingDeleted = FALSE; + m_hScrollBar = m_vScrollBar = m_borderWidget = @@ -360,6 +361,8 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id, // Destructor wxWindow::~wxWindow() { + m_isBeingDeleted = TRUE; + // Motif-specific actions first WXWidget wMain = GetMainWidget(); if ( wMain ) -- 2.45.2