From c7aee86546798174f1ee99567d2c282724d12b43 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 22 Jul 2004 20:23:46 +0000 Subject: [PATCH] Also don't send set focus events when the window is being deleted. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/window.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 223ae9ef0a..222138a21c 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -3430,6 +3430,13 @@ bool wxWindowMSW::HandleActivate(int state, bool wxWindowMSW::HandleSetFocus(WXHWND hwnd) { + // Strangly enough, some controls get set focus events when they are being + // deleted, even if they already had focus before. + if ( m_isBeingDeleted ) + { + return false; + } + // notify the parent keeping track of focus for the kbd navigation // purposes that we got it wxChildFocusEvent eventFocus((wxWindow *)this); -- 2.45.2