From 9f01395e41a6e4c7360e9bdc5b6232238cbf95c2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 8 Feb 2006 21:55:02 +0000 Subject: [PATCH] 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 --- src/msw/toplevel.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 } -- 2.50.0