X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cbf311dd178ed36045f40bb6f485c100a5b28700..c7aee86546798174f1ee99567d2c282724d12b43:/src/msw/window.cpp 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);