]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't reset wxTLW::m_iconized when hiding the window in wxMSW.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 9 Aug 2011 15:46:28 +0000 (15:46 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 9 Aug 2011 15:46:28 +0000 (15:46 +0000)
Calling Hide() on an iconized window wrongly reset its m_iconized flag but
hiding the window shouldn't affect it.

Closes #13373.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68614 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/toplevel.cpp

index 495b865e52498f057c7907980458eeb794dc1fd5..9e068789c82e9bbc1bd33ad4b1ba9666790c6425 100644 (file)
@@ -637,7 +637,13 @@ void wxTopLevelWindowMSW::DoShowWindow(int nShowCmd)
 {
     ::ShowWindow(GetHwnd(), nShowCmd);
 
-    m_iconized = nShowCmd == SW_MINIMIZE;
+    // Hiding the window doesn't change its iconized state.
+    if ( nShowCmd != SW_HIDE )
+    {
+        // Otherwise restoring, maximizing or showing the window normally also
+        // makes it not iconized and only minimizing it does make it iconized.
+        m_iconized = nShowCmd == SW_MINIMIZE;
+    }
 }
 
 void wxTopLevelWindowMSW::ShowWithoutActivating()