]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
minor cleanup
[wxWidgets.git] / src / common / wincmn.cpp
index 05f22c324f3a1486a56d67f6b505c156d0dda8b3..4f7aac9bfd63b368c89a6ece6a1a6067ceaea4df 100644 (file)
@@ -834,14 +834,14 @@ void wxWindowBase::DoSetVirtualSize( int x, int y )
 
 wxSize wxWindowBase::DoGetVirtualSize() const
 {
-    if ( m_virtualSize.IsFullySpecified() )
-        return m_virtualSize;
-
+    // we should use the entire client area so if it is greater than our
+    // virtual size, expand it to fit (otherwise if the window is big enough we
+    // wouldn't be using parts of it)
     wxSize size = GetClientSize();
-    if ( m_virtualSize.x != wxDefaultCoord )
+    if ( m_virtualSize.x > size.x )
         size.x = m_virtualSize.x;
 
-    if ( m_virtualSize.y != wxDefaultCoord )
+    if ( m_virtualSize.y >= size.y )
         size.y = m_virtualSize.y;
 
     return size;