X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/88a7a4e10ed18f81a576dcd866cfbf02bf404c00..b2458f311b426717c4d36b51aed2595a59f373d9:/src/common/sizer.cpp diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index d52151ef33..0b918a1344 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -21,12 +21,12 @@ #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" #if WXWIN_COMPATIBILITY_2_4 @@ -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 );