diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 3af50fc082..0358aafc34 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -754,6 +754,12 @@ void wxTopLevelWindowMSW::OnActivate(wxActivateEvent& event) // remember the last focused child if it is our child m_winLastFocused = FindFocus(); + if ( m_winLastFocused ) + { + // let it know that it doesn't have focus any more + m_winLastFocused->HandleKillFocus(NULL); + } + // so we NULL it out if it's a child from some other frame wxWindow *win = m_winLastFocused; while ( win )