Don't trigger kill focus event twice

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2008-05-03 19:53:53 +00:00
parent cfd9159888
commit b89e104ec0

View File

@@ -1221,7 +1221,9 @@ void wxTopLevelWindowMSW::OnActivate(wxActivateEvent& event)
if ( m_winLastFocused )
{
// let it know that it doesn't have focus any more
m_winLastFocused->HandleKillFocus((WXHWND)NULL);
// But this will already be done via WM_KILLFOCUS, so we'll get two kill
// focus events if we call it explicitly.
// m_winLastFocused->HandleKillFocus((WXHWND)NULL);
// and don't remember it if it's a child from some other frame
if ( wxGetTopLevelParent(m_winLastFocused) != this )