]> git.saurik.com Git - wxWidgets.git/commitdiff
avoid infinite recursion by not using GetMaxWidth/Height() from GetMaxSize() implemen...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 29 Oct 2006 21:10:12 +0000 (21:10 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 29 Oct 2006 21:10:12 +0000 (21:10 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/toplvcmn.cpp

index 88350bebcfc4c63c90b2ff2dd9836f11e469d477..9e0d6357e52640fd698c44ff51d7a6376aee71bd 100644 (file)
@@ -165,16 +165,16 @@ void wxTopLevelWindowBase::GetRectForTopLevelChildren(int *x, int *y, int *w, in
 
 wxSize wxTopLevelWindowBase::GetMaxSize() const
 {
-    wxSize  size( GetMaxWidth(), GetMaxHeight() );
-    int     w, h;
+    wxSize size = wxWindow::GetMaxSize();
 
-    wxClientDisplayRect( 0, 0, &w, &h );
+    int w, h;
+    wxClientDisplayRect(NULL, NULL, &w, &h );
 
-    if( size.GetWidth() == wxDefaultCoord )
-        size.SetWidth( w );
+    if ( size.GetWidth() == wxDefaultCoord )
+        size.SetWidth(w);
 
-    if( size.GetHeight() == wxDefaultCoord )
-        size.SetHeight( h );
+    if ( size.GetHeight() == wxDefaultCoord )
+        size.SetHeight(h);
 
     return size;
 }