From 0b4804594c209381fd6d4e8414f8d27e05f84de5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 20 Feb 2014 00:32:54 +0000 Subject: [PATCH] Don't show the MDI children implicitly by default in wxMSW any more. We kept doing it for compatibility with pre-2.5.3 versions but this was a long time ago and we don't need this any longer. See #2508. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/mdi.h | 1 - src/msw/mdi.cpp | 13 ------------- 2 files changed, 14 deletions(-) diff --git a/include/wx/msw/mdi.h b/include/wx/msw/mdi.h index a699a3125c..867ea302c1 100644 --- a/include/wx/msw/mdi.h +++ b/include/wx/msw/mdi.h @@ -225,7 +225,6 @@ protected: void Init(); private: - bool m_needsInitialShow; // Show must be called in idle time after Creation bool m_needsResize; // flag which tells us to artificially resize the frame DECLARE_EVENT_TABLE() diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 5a1aae5373..854ea0bafb 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -757,7 +757,6 @@ bool wxMDIParentFrame::MSWTranslateMessage(WXMSG* msg) void wxMDIChildFrame::Init() { m_needsResize = true; - m_needsInitialShow = true; } bool wxMDIChildFrame::Create(wxMDIParentFrame *parent, @@ -881,8 +880,6 @@ wxMDIChildFrame::~wxMDIChildFrame() bool wxMDIChildFrame::Show(bool show) { - m_needsInitialShow = false; - if (!wxFrame::Show(show)) return false; @@ -1395,16 +1392,6 @@ void wxMDIClientWindow::DoSetSize(int x, int y, int width, int height, int sizeF void wxMDIChildFrame::OnIdle(wxIdleEvent& event) { - // wxMSW prior to 2.5.3 created MDI child frames as visible, which resulted - // in flicker e.g. when the frame contained controls with non-trivial - // layout. Since 2.5.3, the frame is created hidden as all other top level - // windows. In order to maintain backward compatibility, the frame is shown - // in OnIdle, unless Show(false) was called by the programmer before. - if ( m_needsInitialShow ) - { - Show(true); - } - // MDI child frames get their WM_SIZE when they're constructed but at this // moment they don't have any children yet so all child windows will be // positioned incorrectly when they are added later - to fix this, we