]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/frame.cpp
don't use deprecated macros
[wxWidgets.git] / src / motif / frame.cpp
index 18dc34e554286a5fca291f671c6e7793032f14d7..f65136d32db9eebc4d9001481da85feaca4305f7 100644 (file)
@@ -310,15 +310,19 @@ wxFrame::~wxFrame()
         delete m_frameStatusBar;
         m_frameStatusBar = NULL;
     }
+
+    PreDestroy();
+    DoDestroy();
 }
 
 void wxFrame::DoDestroy()
 {
     Widget frameShell = (Widget)GetShellWidget();
 
-    XtRemoveEventHandler( frameShell, StructureNotifyMask,
-                          False, (XtEventHandler)wxFrameMapProc,
-                          (XtPointer)this );
+    if( frameShell )
+        XtRemoveEventHandler( frameShell, StructureNotifyMask,
+                              False, (XtEventHandler)wxFrameMapProc,
+                              (XtPointer)this );
 
     if( m_clientArea )
     {
@@ -501,10 +505,12 @@ void wxFrame::DoSetIcon(const wxIcon& icon)
     if (!m_frameShell)
         return;
 
-    if (!icon.Ok() || !icon.GetPixmap())
+    if (!icon.Ok() || !icon.GetDrawable())
         return;
 
-    XtVaSetValues((Widget) m_frameShell, XtNiconPixmap, icon.GetPixmap(), NULL);
+    XtVaSetValues((Widget) m_frameShell,
+                  XtNiconPixmap, icon.GetDrawable(),
+                  NULL);
 }
 
 void wxFrame::SetIcon(const wxIcon& icon)
@@ -656,7 +662,7 @@ void wxFrame::PositionToolBar()
             tw = cw;
         }
 
-        tb->SetSize(0, 0, tw, th, wxSIZE_NO_ADJUSTMENTS);
+        tb->SetSize(0, 0, -1, -1, wxSIZE_NO_ADJUSTMENTS);
     }
 }
 #endif // wxUSE_TOOLBAR