X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d786bf877e3568473ac2c295261f17e82199fdd8..4f9297b0eead20a0bfee71df18e0d8f0cbc402fb:/src/gtk/frame.cpp diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index 9cae95648b..71d58cae4d 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -455,12 +455,24 @@ void wxFrame::Init() 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;