From af9c02ce209c78a17bedf18ba8a4f955e70a8fd2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 9 Aug 2011 15:46:28 +0000 Subject: [PATCH] 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 --- src/msw/toplevel.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 495b865..9e06878 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() -- 2.7.4