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
This commit is contained in:
Vadim Zeitlin
2014-02-20 00:32:54 +00:00
parent 41d5ebc86f
commit 0b4804594c
2 changed files with 0 additions and 14 deletions

View File

@@ -225,7 +225,6 @@ protected:
void Init(); void Init();
private: 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 bool m_needsResize; // flag which tells us to artificially resize the frame
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()

View File

@@ -757,7 +757,6 @@ bool wxMDIParentFrame::MSWTranslateMessage(WXMSG* msg)
void wxMDIChildFrame::Init() void wxMDIChildFrame::Init()
{ {
m_needsResize = true; m_needsResize = true;
m_needsInitialShow = true;
} }
bool wxMDIChildFrame::Create(wxMDIParentFrame *parent, bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
@@ -881,8 +880,6 @@ wxMDIChildFrame::~wxMDIChildFrame()
bool wxMDIChildFrame::Show(bool show) bool wxMDIChildFrame::Show(bool show)
{ {
m_needsInitialShow = false;
if (!wxFrame::Show(show)) if (!wxFrame::Show(show))
return false; return false;
@@ -1395,16 +1392,6 @@ void wxMDIClientWindow::DoSetSize(int x, int y, int width, int height, int sizeF
void wxMDIChildFrame::OnIdle(wxIdleEvent& event) 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 // 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 // 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 // positioned incorrectly when they are added later - to fix this, we