]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/frame.cpp
wxHTML src code indentation now conforms (more) to wxWin coding style
[wxWidgets.git] / src / gtk / frame.cpp
index 9cae95648b4620edbf4ad3179ee3b61cc6c9d2a9..71d58cae4d26fb01e701b0be41bf426fe5670144 100644 (file)
@@ -455,12 +455,24 @@ void wxFrame::Init()
 
 bool wxFrame::Create( wxWindow *parent,
                       wxWindowID id,
 
 bool wxFrame::Create( wxWindow *parent,
                       wxWindowID id,
-                      const wxString &title,
-                      const wxPoint &pos,
-                      const wxSize &size,
+                      const wxStringtitle,
+                      const wxPointpos,
+                      const wxSize& sizeOrig,
                       long style,
                       const wxString &name )
 {
                       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;
     wxTopLevelWindows.Append( this );
 
     m_needParent = FALSE;