]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/toplevel.cpp
compilation fix for systems with XtIMSignal
[wxWidgets.git] / src / msw / toplevel.cpp
index 4324dca617e118466343ae220e6774270d9d4f73..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());
     }
 }
 
@@ -676,7 +684,7 @@ bool wxTopLevelWindowMSW::IsMaximized() const
 #ifdef __WXWINCE__
     return false;
 #else
-    return ::IsZoomed(GetHwnd()) != 0;
+    return m_maximizeOnShow || ::IsZoomed(GetHwnd()) != 0;
 #endif
 }