From: Kevin Hock Date: Tue, 8 Nov 2005 14:41:09 +0000 (+0000) Subject: Remove fudges in Show: 1) Do not force a window to top when it is shown 2) Remove... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/75e275af320f70d9bb57dd30494f6cc2c100dc25?ds=inline Remove fudges in Show: 1) Do not force a window to top when it is shown 2) Remove extra ACTIVATE event on show 3) Do not fudge resetting focus after closing a window (always setting to the parent can lead to unnatural results) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 2a76e65ebb..8b7cc3f70a 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -617,27 +617,6 @@ bool wxTopLevelWindowMSW::Show(bool show) if (frame && frame->GetMenuBar()) frame->GetMenuBar()->AddAdornments(GetWindowStyleFlag()); #endif - - if ( show ) - { - ::BringWindowToTop(GetHwnd()); - - wxActivateEvent event(wxEVT_ACTIVATE, true, m_windowId); - event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); - } - else // hide - { - // Try to highlight the correct window (the parent) - if ( GetParent() ) - { - HWND hWndParent = GetHwndOf(GetParent()); - if (hWndParent) - ::BringWindowToTop(hWndParent); - } - } - - return true; } // ----------------------------------------------------------------------------