X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3a6b0a3e5d5db2fdd8b49d1b124619770fb0e561..5e23e2d59a25a7eae5ca16958877be59f7eeb33b:/src/msw/toplevel.cpp diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 4324dca617..2b7fdf4a48 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -668,6 +668,14 @@ void wxTopLevelWindowMSW::Maximize(bool maximize) // we can't maximize the hidden frame because it shows it as well, so // just remember that we should do it later in this case m_maximizeOnShow = maximize; + + // after calling Maximize() the client code expects to get the frame + // "real" size and doesn't want to know that, because of implementation + // details, the frame isn't really maximized yet but will be only once + // it's shown, so return our size as it will be then in this case + + // we don't know which display we're on yet so use the default one + SetSize(wxGetClientDisplayRect().GetSize()); } } @@ -676,7 +684,7 @@ bool wxTopLevelWindowMSW::IsMaximized() const #ifdef __WXWINCE__ return false; #else - return ::IsZoomed(GetHwnd()) != 0; + return m_maximizeOnShow || ::IsZoomed(GetHwnd()) != 0; #endif }