]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/frame.cpp
Fix cvs conflict.
[wxWidgets.git] / src / gtk / frame.cpp
index bb7d68e74fdd7b6ffc17e61f3aaf2326a8da8283..71d58cae4d26fb01e701b0be41bf426fe5670144 100644 (file)
@@ -447,6 +447,7 @@ void wxFrame::Init()
     m_menuBarDetached = FALSE;
     m_toolBarDetached = FALSE;
     m_insertInClientArea = TRUE;
+    m_isFrame = TRUE;
     m_isIconized = FALSE;
     m_fsIsShowing = FALSE;
     m_themeEnabled = TRUE;
@@ -454,12 +455,24 @@ void wxFrame::Init()
 
 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 )
 {
+    // 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;