X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..27c78e4552aaefac9a4db0d4453eff09cdfef2ad:/src/msw/mdi.cpp diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index fa13c1c64e..b0ec95a99d 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -789,7 +789,17 @@ wxMDIChildFrame::~wxMDIChildFrame() bool wxMDIChildFrame::Show(bool show) { m_needsInitialShow = false; - return wxFrame::Show(show); + + if (!wxFrame::Show(show)) + return false; + + // KH: Without this call, new MDI children do not become active. + // This was added here after the same BringWindowToTop call was + // removed from wxTopLevelWindow::Show (November 2005) + if ( show ) + ::BringWindowToTop(GetHwnd()); + + return true; } // Set the client size (i.e. leave the calculation of borders etc.