]> git.saurik.com Git - wxWidgets.git/commitdiff
don't set frame size to maximized one if we're restoring it
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 31 Dec 2005 19:59:39 +0000 (19:59 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 31 Dec 2005 19:59:39 +0000 (19:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/toplevel.cpp

index f5689a3aab48f4b81bbf260ded68dd3ad63064ff..9d742a864b9162323a5e3d33ec8f563cfb2676ad 100644 (file)
@@ -713,9 +713,13 @@ void wxTopLevelWindowMSW::Maximize(bool maximize)
         // "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());
+        if ( maximize )
+        {
+            // unfortunatrly we don't know which display we're on yet so we
+            // have to use the default one
+            SetSize(wxGetClientDisplayRect().GetSize());
+        }
+        //else: can't do anything in this case, we don't have the old size
     }
 }