From 02a338910615f6c38f76858e36cc46c7dfd5b62c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 20 Dec 2007 20:04:46 +0000 Subject: [PATCH] wxScrolledWindow can get wxEVT_CHILD_FOCUS event for itself, handle that case too git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/scrlwing.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/generic/scrlwing.cpp b/src/generic/scrlwing.cpp index 0b6c1fcc6e..7b686a1cf3 100644 --- a/src/generic/scrlwing.cpp +++ b/src/generic/scrlwing.cpp @@ -1359,6 +1359,10 @@ void wxScrollHelper::HandleOnChildFocus(wxChildFocusEvent& event) // find the immediate child under which the window receiving focus is: wxWindow *win = event.GetWindow(); + + if ( win == m_targetWindow ) + return; // nothing to do + while ( win->GetParent() != m_targetWindow ) { win = win->GetParent();