X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/917afc7b81c6f806ea3d50b455f7c4e320ecd68f..42d6e1369732fde88762b3936f78857cccb82b8e:/src/mgl/toplevel.cpp diff --git a/src/mgl/toplevel.cpp b/src/mgl/toplevel.cpp index 1cf60d5e6f..3f2bbcd209 100644 --- a/src/mgl/toplevel.cpp +++ b/src/mgl/toplevel.cpp @@ -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; } @@ -139,8 +140,9 @@ bool wxTopLevelWindowMGL::ShowFullScreen(bool show, long style) bool wxTopLevelWindowMGL::Show(bool show) { bool ret = wxTopLevelWindowBase::Show(show); - if ( ret && show ) + if ( ret && show && AcceptsFocus() ) SetFocus(); + // FIXME_MGL -- don't do this for popup windows? return ret; }