avoiding recursive KillEvents on the same object, in case the focus gets set to another element in the OnKillEvent Handler ...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -343,9 +343,15 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
|
|||||||
thisWindow->GetCaret()->OnKillFocus();
|
thisWindow->GetCaret()->OnKillFocus();
|
||||||
}
|
}
|
||||||
#endif // wxUSE_CARET
|
#endif // wxUSE_CARET
|
||||||
|
static bool inKillFocusEvent = false ;
|
||||||
|
if ( !inKillFocusEvent )
|
||||||
|
{
|
||||||
|
inKillFocusEvent = true ;
|
||||||
wxFocusEvent event( wxEVT_KILL_FOCUS, thisWindow->GetId());
|
wxFocusEvent event( wxEVT_KILL_FOCUS, thisWindow->GetId());
|
||||||
event.SetEventObject(thisWindow);
|
event.SetEventObject(thisWindow);
|
||||||
thisWindow->GetEventHandler()->ProcessEvent(event) ;
|
thisWindow->GetEventHandler()->ProcessEvent(event) ;
|
||||||
|
inKillFocusEvent = false ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user