- /*
- * Redirect events to active child first.
- */
-
- // Stops the same event being processed repeatedly
- static wxEventType inEvent = wxEVT_NULL;
- if (inEvent == event.GetEventType())
- return FALSE;
-
- inEvent = event.GetEventType();
-
- // Let the active child (if any) process the event first.
- bool res = FALSE;
- if (m_pActiveChild && event.IsKindOf(CLASSINFO(wxCommandEvent))
-#if 0
- /* This is sure to not give problems... */
- && (event.GetEventType() == wxEVT_COMMAND_MENU_SELECTED ||
- event.GetEventType() == wxEVT_UPDATE_UI )
-#else
- /* This was tested on wxMSW and worked... */
- && event.GetEventObject() != m_pClientWindow
- && !(event.GetEventType() == wxEVT_ACTIVATE ||
- event.GetEventType() == wxEVT_SET_FOCUS ||
- event.GetEventType() == wxEVT_KILL_FOCUS ||
- event.GetEventType() == wxEVT_CHILD_FOCUS ||
- event.GetEventType() == wxEVT_COMMAND_SET_FOCUS ||
- event.GetEventType() == wxEVT_COMMAND_KILL_FOCUS )
-#endif
- )
- {
- res = m_pActiveChild->GetEventHandler()->ProcessEvent(event);
- }
-
- // If the event was not handled this frame will handle it!
- if (!res)
- {
- res = GetEventHandler()->wxEvtHandler::ProcessEvent(event);
- }
-
- inEvent = wxEVT_NULL;
-
- return res;