From 1383482892b0fd7b47cde00c9fd2479289e0ac06 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 15 Dec 2002 18:17:15 +0000 Subject: [PATCH] send an extra kill focus event when we're deactivated git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/toplevel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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 ) -- 2.47.2