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
This commit is contained in:
parent
2175898cf6
commit
75e275af32
@ -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;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user