]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mgl/toplevel.cpp
corrected wxGetWorkingDirectory for mac (stripping last char off)
[wxWidgets.git] / src / mgl / toplevel.cpp
index 5829d32f97977a90841ede5f57fea39502e4383f..3f2bbcd209f4d9f904cb33430b9fa8cf3dcf32b8 100644 (file)
@@ -77,13 +77,14 @@ bool wxTopLevelWindowMGL::Create(wxWindow *parent,
             size.y = sizeDpy.y / 5;
     }
     
-    wxWindow::Create(parent, id, pos, sizeOrig, style, name);
+    wxWindow::Create(NULL, id, pos, sizeOrig, style, name);
+    SetParent(parent);
+    if ( parent )
+        parent->AddChild(this);
 
     wxTopLevelWindows.Append(this);
 
     m_title = title;
-    
-    // FIXME_MGL -- should activate itself when shown!
 
     return TRUE;
 }
@@ -136,6 +137,15 @@ bool wxTopLevelWindowMGL::ShowFullScreen(bool show, long style)
     return TRUE;
 }
 
+bool wxTopLevelWindowMGL::Show(bool show)
+{
+    bool ret = wxTopLevelWindowBase::Show(show);
+    if ( ret && show && AcceptsFocus() )
+        SetFocus();
+        // FIXME_MGL -- don't do this for popup windows?
+    return ret;
+}
+
 void wxTopLevelWindowMGL::Maximize(bool maximize)
 {
     if ( maximize && !m_isMaximized )