X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f3190d1ceaf664645d9583ba51931f49294405c0..b2458f311b426717c4d36b51aed2595a59f373d9:/src/common/sizer.cpp diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 1d9e4c216b..0b918a1344 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -21,14 +21,14 @@ #include "wx/string.h" #include "wx/intl.h" #include "wx/math.h" + #include "wx/utils.h" + #include "wx/settings.h" #endif // WX_PRECOMP #include "wx/sizer.h" -#include "wx/utils.h" #include "wx/statbox.h" -#include "wx/settings.h" #include "wx/listimpl.cpp" -#include "wx/intl.h" + #if WXWIN_COMPATIBILITY_2_4 #include "wx/notebook.h" #endif @@ -732,6 +732,15 @@ wxSize wxSizer::GetMinWindowSize( wxWindow *window ) // Return a window size that will fit within the screens dimensions wxSize wxSizer::FitSize( wxWindow *window ) { + if ( window->IsTopLevel() ) + { + wxTopLevelWindow *tlw = wxDynamicCast(window, wxTopLevelWindow); + if ( tlw && tlw->IsAlwaysMaximized() ) + { + return tlw->GetClientSize(); + } + } + wxSize size = GetMinWindowSize( window ); wxSize sizeMax = GetMaxWindowSize( window );