X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5d8d4b669a311a8b0c64939e82fc4d5bb6c36796..eea4d01c65f9b29baa1193db762b4c6b8144af24:/src/msw/toplevel.cpp 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()