]> git.saurik.com Git - wxWidgets.git/commitdiff
made wxTLW::GetSize() return the size of the maximized frame when called between...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 9 Jul 2005 21:25:30 +0000 (21:25 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 9 Jul 2005 21:25:30 +0000 (21:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/toplevel.cpp

index c8d5ef01f22063c7dd196a91ee9385e531e3a2f2..2b7fdf4a48676b94d74395dfbc7ac36bf1a70a98 100644 (file)
@@ -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());
     }
 }