- wxWindow* win = view->GetFrame();
- if ( win != m_frame )
- {
- // Notice that we intentionally don't use wxGetTopLevelParent()
- // here because we want to check both for the case of a child
- // "frame" (e.g. MDI child frame or notebook page) inside this TLW
- // and a separate child TLW frame (as used in the SDI mode) here.
- for ( win = win->GetParent(); win; win = win->GetParent() )
- {
- if ( win == m_frame )
- return false;
- }
- }
- //else: This view is directly associated with the parent frame (which
- // can happen in the so called "single" mode in which only one
- // document can be opened and so is managed by the parent frame
- // itself), there can be no child frame in play so we must forward
- // the event to wxDocManager ourselves.
+ wxDocChildFrameAnyBase* const childFrame = view->GetDocChildFrame();
+ if ( childFrame && childFrame->HasAlreadyProcessed(event) )
+ return false;