]> git.saurik.com Git - wxWidgets.git/commitdiff
Also don't send set focus events when the window is being deleted.
authorRobin Dunn <robin@alldunn.com>
Thu, 22 Jul 2004 20:23:46 +0000 (20:23 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 22 Jul 2004 20:23:46 +0000 (20:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index 223ae9ef0a37d224fded289e939a31ea93299d11..222138a21c4eda8df1d5643b80b92b215bb6673f 100644 (file)
@@ -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);