X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e702ff0f08a54622a6b0f1e2ec39537b082c3a8e..aef82f12c833f22b22d4a1ffb09261569d1fe1e8:/src/common/framecmn.cpp diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp index 163b00a160..591382e187 100644 --- a/src/common/framecmn.cpp +++ b/src/common/framecmn.cpp @@ -31,20 +31,17 @@ void wxFrame::DoMenuUpdates() { wxMenuBar* bar = GetMenuBar(); - // Process events starting with the window with the focus, if any. - wxWindow* focusWin = wxFindFocusDescendant(this); - if ( bar != NULL ) { int nCount = bar->GetMenuCount(); for (int n = 0; n < nCount; n++) - DoMenuUpdates(bar->GetMenu(n), focusWin); + DoMenuUpdates(bar->GetMenu(n), (wxWindow*) NULL); } } // update a menu and all submenus recursively -void wxFrame::DoMenuUpdates(wxMenu* menu, wxWindow* focusWin) +void wxFrame::DoMenuUpdates(wxMenu* menu, wxWindow* WXUNUSED(focusWin)) { - wxEvtHandler* evtHandler = focusWin ? focusWin->GetEventHandler() : GetEventHandler(); + wxEvtHandler* evtHandler = GetEventHandler(); wxNode* node = menu->GetItems().First(); while (node) { @@ -66,7 +63,7 @@ void wxFrame::DoMenuUpdates(wxMenu* menu, wxWindow* focusWin) } if (item->GetSubMenu()) - DoMenuUpdates(item->GetSubMenu(), focusWin); + DoMenuUpdates(item->GetSubMenu(), (wxWindow*) NULL); } node = node->Next(); }