X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/78f933650057d0e09ee06b59f7d23cb83b48e1b3..f3b1d0fc56fd93f17244c186d7f961797efc35e3:/src/mgl/toplevel.cpp?ds=inline diff --git a/src/mgl/toplevel.cpp b/src/mgl/toplevel.cpp index 80646a601f..d2ede3f43c 100644 --- a/src/mgl/toplevel.cpp +++ b/src/mgl/toplevel.cpp @@ -7,6 +7,13 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + // ============================================================================ // declarations // ============================================================================ @@ -15,16 +22,9 @@ // headers // ---------------------------------------------------------------------------- -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif +#include "wx/toplevel.h" #ifndef WX_PRECOMP - #include "wx/defs.h" - #include "wx/toplevel.h" #include "wx/app.h" #endif // WX_PRECOMP @@ -109,22 +109,6 @@ bool wxTopLevelWindowMGL::Create(wxWindow *parent, return true; } -wxTopLevelWindowMGL::~wxTopLevelWindowMGL() -{ - m_isBeingDeleted = true; - - wxTopLevelWindows.DeleteObject(this); - - if (wxTheApp->GetTopWindow() == this) - wxTheApp->SetTopWindow(NULL); - - if (wxTopLevelWindows.IsEmpty() && - wxTheApp->GetExitOnFrameDelete()) - { - wxTheApp->ExitMainLoop(); - } -} - bool wxTopLevelWindowMGL::ShowFullScreen(bool show, long style) { if (show == m_fsIsShowing) return false; // return what? @@ -168,10 +152,10 @@ bool wxTopLevelWindowMGL::Show(bool show) m_sizeSet = true; wxSizeEvent event(GetSize(), GetId()); event.SetEventObject(this); - GetEventHandler()->ProcessEvent(event); + HandleWindowEvent(event); } - if ( ret && show && AcceptsFocus() ) + if ( ret && show && CanAcceptFocus() ) SetFocus(); // FIXME_MGL -- don't do this for popup windows? return ret;