]> git.saurik.com Git - wxWidgets.git/commitdiff
avoiding recursive KillEvents on the same object, in case the focus gets set to anoth...
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 19 Aug 2005 06:46:30 +0000 (06:46 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 19 Aug 2005 06:46:30 +0000 (06:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/window.cpp

index 7097a160b9ce0c329fb6630378a63a6a8743e5ad..a25e4b30e70c0a49e40cb96ec3485afd8d2fe06c 100644 (file)
@@ -343,9 +343,15 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
                         thisWindow->GetCaret()->OnKillFocus();
                     }
         #endif // wxUSE_CARET
-                    wxFocusEvent event( wxEVT_KILL_FOCUS, thisWindow->GetId());
-                    event.SetEventObject(thisWindow);
-                    thisWindow->GetEventHandler()->ProcessEvent(event) ;
+                    static bool inKillFocusEvent = false ;
+                    if ( !inKillFocusEvent )
+                    {
+                        inKillFocusEvent = true ;
+                        wxFocusEvent event( wxEVT_KILL_FOCUS, thisWindow->GetId());
+                        event.SetEventObject(thisWindow);
+                        thisWindow->GetEventHandler()->ProcessEvent(event) ;
+                        inKillFocusEvent = false ;
+                    }
                 }
                 else
                 {