From: Vadim Zeitlin Date: Tue, 9 Aug 2011 15:46:28 +0000 (+0000) Subject: Don't reset wxTLW::m_iconized when hiding the window in wxMSW. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/af9c02ce209c78a17bedf18ba8a4f955e70a8fd2?ds=sidebyside Don't reset wxTLW::m_iconized when hiding the window in wxMSW. 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 --- diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 495b865e52..9e068789c8 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -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()