From a926f0f996a9b22f7da14a32a4429abe026af59e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 29 Oct 2002 00:34:15 +0000 Subject: [PATCH] fix for setting m_winLastFocused correctly in some situations (see bug 622297) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/containr.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/containr.cpp b/src/common/containr.cpp index 7ca89fb072..5b5df9ea92 100644 --- a/src/common/containr.cpp +++ b/src/common/containr.cpp @@ -247,10 +247,12 @@ void wxControlContainer::HandleOnNavigationKey( wxNavigationKeyEvent& event ) event.SetEventObject(m_winParent); if ( !child->GetEventHandler()->ProcessEvent(event) ) { + // set it first in case SetFocusFromKbd() results in focus + // change too + m_winLastFocused = child; + // everything is simple: just give focus to it child->SetFocusFromKbd(); - - m_winLastFocused = child; } //else: the child manages its focus itself