]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/toplevel.cpp
Ensure that the native font is initialized so the face name and such
[wxWidgets.git] / src / motif / toplevel.cpp
index 9968142e4146c101ba4cef6008d759aeff63560e..5f2891a4e5ff1f7324412208fb1fadce5d97f838 100644 (file)
@@ -17,7 +17,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(__APPLE__)
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "toplevel.h"
 #endif
 
@@ -66,8 +66,6 @@ static void wxTLWEventHandler( Widget wid,
 
 void wxTopLevelWindowMotif::PreDestroy()
 {
-    wxTopLevelWindows.DeleteObject(this);
-
     if ( (GetWindowStyleFlag() & wxDIALOG_MODAL) != wxDIALOG_MODAL )
         wxModelessWindows.DeleteObject(this);
 
@@ -90,17 +88,6 @@ void wxTopLevelWindowMotif::PreDestroy()
 wxTopLevelWindowMotif::~wxTopLevelWindowMotif()
 {
     SetMainWidget( (WXWidget)0 );
-
-    // If this is the last top-level window, exit.
-    if (wxTheApp && (wxTopLevelWindows.GetCount() == 0))
-    {
-        wxTheApp->SetTopWindow(NULL);
-
-        if (wxTheApp->GetExitOnFrameDelete())
-        {
-            wxTheApp->ExitMainLoop();
-        }
-    }
 }
 
 void wxTopLevelWindowMotif::Init()
@@ -336,6 +323,13 @@ void wxTopLevelWindowMotif::SetSizeHints( int minW, int minH,
     XtSetValues( (Widget)GetShellWidget(), args, count ); 
 }
 
+bool wxTopLevelWindowMotif::SetShape( const wxRegion& region )
+{
+    return wxDoSetShape( (Display*)GetXDisplay(),
+                         XtWindow( (Widget)GetShellWidget() ),
+                         region );
+}
+
 // ---------------------------------------------------------------------------
 // Callback definition
 // ---------------------------------------------------------------------------