git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43035
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "wx/log.h"
#endif //WX_PRECOMP
+#include "wx/recguard.h"
+
#ifdef __WXUNIVERSAL__
#include "wx/univ/renderer.h"
#include "wx/scrolbar.h"
void wxPopupFocusHandler::OnKeyDown(wxKeyEvent& event)
{
+ // we can be associated with the popup itself in which case we should avoid
+ // infinite recursion
+ static int s_inside;
+ wxRecursionGuard guard(s_inside);
+ if ( guard.IsInside() )
+ {
+ event.Skip();
+ return;
+ }
+
// let the window have it first, it might process the keys
if ( !m_popup->GetEventHandler()->ProcessEvent(event) )
{