From: Julian Smart Date: Sat, 3 May 2008 19:53:53 +0000 (+0000) Subject: Don't trigger kill focus event twice X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b89e104ec0b9a591a82703a00fcac3432a93cf41?ds=inline Don't trigger kill focus event twice git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index f87a982735..11aa012a7f 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -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 )