]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/toplevel.cpp
more fixes to radio menu items: fixed Check() for them; allow separators inside the...
[wxWidgets.git] / src / gtk / toplevel.cpp
index 3bbb16f09838c2e5b30e94daf296eff502cea20b..dbe2a3a928a2ffbae0245a44e33f2b28da7980ff 100644 (file)
@@ -376,7 +376,14 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
         win_type = GTK_WINDOW_POPUP;
 
     if (GetExtraStyle() & wxTOPLEVEL_EX_DIALOG)
+    {
+        // there is no more GTK_WINDOW_DIALOG in 2.0
+#ifdef __WXGTK20__
+        win_type = GTK_WINDOW_TOPLEVEL;
+#else
         win_type = GTK_WINDOW_DIALOG;
+#endif
+    }
 
     m_widget = gtk_window_new( win_type );
 
@@ -508,7 +515,11 @@ wxTopLevelWindowGTK::~wxTopLevelWindowGTK()
 {
     m_isBeingDeleted = TRUE;
     
-    gtk_window_set_focus( GTK_WINDOW(m_widget), NULL );
+    // it may also be GtkScrolledWindow in the case of an MDI child
+    if (GTK_IS_WINDOW(m_widget))
+    {
+        gtk_window_set_focus( GTK_WINDOW(m_widget), NULL );
+    }
 
     wxTopLevelWindows.DeleteObject( this );