From 7889b795caf13864867b5d4a4148e1003a1e6953 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 31 Dec 2005 19:59:39 +0000 Subject: [PATCH] don't set frame size to maximized one if we're restoring it git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/toplevel.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index f5689a3aab..9d742a864b 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -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 } } -- 2.45.2