From: Vadim Zeitlin Date: Wed, 8 Feb 2006 21:55:02 +0000 (+0000) Subject: don't update m_iconized in IsIconized(), this can break wxFrame::HandleSize() logic... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9f01395e41a6e4c7360e9bdc5b6232238cbf95c2 don't update m_iconized in IsIconized(), this can break wxFrame::HandleSize() logic (bug 1407848) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index e1ac910f09..e861e661ef 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -742,10 +742,11 @@ bool wxTopLevelWindowMSW::IsIconized() const #ifdef __WXWINCE__ return false; #else - // also update the current state - ((wxTopLevelWindowMSW *)this)->m_iconized = ::IsIconic(GetHwnd()) != 0; - - return m_iconized; + // don't use m_iconized, it may be briefly out of sync with the real state + // as it's only modified when we receive a WM_SIZE and we could be called + // from an event handler from one of the messages we receive before it, + // such as WM_MOVE + return ::IsIconic(GetHwnd()) != 0; #endif }