]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
Found bug that skrewed up display wrt horizontal
[wxWidgets.git] / src / common / wincmn.cpp
index 4df298217edc9cdbc1047a2cc682099801853f29..bd49ebf5dd893aa8cfbd76ffd9556ea7d3e78ab3 100644 (file)
@@ -123,12 +123,12 @@ void wxWindowBase::InitBase()
     // m_foregroundColour = *wxBLACK;  // TODO take this from sys settings too?
     m_foregroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOWTEXT);
 
-#if !defined(__WXMAC__) && !defined(__WXGTK__)
+    // GRG, changed Mar/2000
+#if 0 // !defined(__WXMAC__) && !defined(__WXGTK__)
     m_font = *wxSWISS_FONT;         //      and this?
 #else
     m_font = settings.GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
 #endif
-
     // no style bits
     m_exStyle =
     m_windowStyle = 0;
@@ -403,6 +403,14 @@ wxSize wxWindowBase::DoGetBestSize() const
 
             int wx, wy, ww, wh;
             win->GetPosition(&wx, &wy);
+
+            // if the window hadn't been positioned yet, assume that it is in
+            // the origin
+            if ( wx == -1 )
+                wx = 0;
+            if ( wy == -1 )
+                wy = 0;
+
             win->GetSize(&ww, &wh);
             if ( wx + ww > maxX )
                 maxX = wx + ww;