]> git.saurik.com Git - wxWidgets.git/commitdiff
Re-added XtDestroyWidget call in ~wxWindow - hopefully fixed the problem
authorStefan Neis <Stefan.Neis@t-online.de>
Sun, 5 Mar 2000 20:03:09 +0000 (20:03 +0000)
committerStefan Neis <Stefan.Neis@t-online.de>
Sun, 5 Mar 2000 20:03:09 +0000 (20:03 +0000)
        with scrolledWindow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/motif/window.cpp

index f251d7492e6022f273483a64166d85c59cb22111..9c1ff9d83eaf41601c1224e914442453aa1b0382 100644 (file)
@@ -408,10 +408,9 @@ wxWindow::~wxWindow()
         if (w)
         {
             XtDestroyWidget(w);
         if (w)
         {
             XtDestroyWidget(w);
+           m_drawingArea = (WXWidget) 0;
         }
 
         }
 
-        m_mainWidget = (WXWidget) 0;
-
         // Only if we're _really_ a canvas (not a dialog box/panel)
         if (m_scrolledWindow)
         {
         // Only if we're _really_ a canvas (not a dialog box/panel)
         if (m_scrolledWindow)
         {
@@ -451,7 +450,8 @@ wxWindow::~wxWindow()
         //   wxSCROLL[WIN]_THUMBRELEASE events. Also it was reported
         //   that this call crashed wxMotif under OS/2, so it seems
         //   that leaving it out is the right thing to do.
         //   wxSCROLL[WIN]_THUMBRELEASE events. Also it was reported
         //   that this call crashed wxMotif under OS/2, so it seems
         //   that leaving it out is the right thing to do.
-//        XtDestroyWidget((Widget) GetMainWidget());
+        // SN, Feb/2000: newgrid/griddemo shows why it is needed :-(
+        XtDestroyWidget((Widget) GetMainWidget());
         SetMainWidget((WXWidget) NULL);
     }
 }
         SetMainWidget((WXWidget) NULL);
     }
 }