X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/117247fd2cf664fc7b86b3101246a3a58332898a..10992a81d39da31b79063387b7b71c0ff68737ce:/src/gtk1/frame.cpp diff --git a/src/gtk1/frame.cpp b/src/gtk1/frame.cpp index a0be42f520..71d58cae4d 100644 --- a/src/gtk1/frame.cpp +++ b/src/gtk1/frame.cpp @@ -447,18 +447,32 @@ void wxFrame::Init() m_menuBarDetached = FALSE; m_toolBarDetached = FALSE; m_insertInClientArea = TRUE; + m_isFrame = TRUE; m_isIconized = FALSE; m_fsIsShowing = FALSE; + m_themeEnabled = TRUE; } bool wxFrame::Create( wxWindow *parent, wxWindowID id, - const wxString &title, - const wxPoint &pos, - const wxSize &size, + const wxString& title, + const wxPoint& pos, + const wxSize& sizeOrig, long style, const wxString &name ) { + // always create a frame of some reasonable, even if arbitrary, size (at + // least for MSW compatibility) + wxSize size = sizeOrig; + if ( size.x == -1 || size.y == -1 ) + { + wxSize sizeDpy = wxGetDisplaySize(); + if ( size.x == -1 ) + size.x = sizeDpy.x / 3; + if ( size.y == -1 ) + size.y = sizeDpy.y / 5; + } + wxTopLevelWindows.Append( this ); m_needParent = FALSE; @@ -1177,8 +1191,9 @@ void wxFrame::Maximize(bool WXUNUSED(maximize)) bool wxFrame::IsMaximized() const { - wxFAIL_MSG( _T("not implemented") ); + // wxFAIL_MSG( _T("not implemented") ); + // This is an approximation return FALSE; }