X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e306597309a120f2ae91385c731a5cb2722c52aa..e459f82d0110709444984bf739314f4a84de48d3:/src/mac/frame.cpp?ds=inline diff --git a/src/mac/frame.cpp b/src/mac/frame.cpp index b370f7b108..55f1e3b72c 100644 --- a/src/mac/frame.cpp +++ b/src/mac/frame.cpp @@ -450,7 +450,12 @@ void wxFrame::ProcessCommand(int id) } */ - GetEventHandler()->ProcessEvent(commandEvent); + // Process events starting with the window with the focus, if any. + wxWindow* focusWin = wxFindFocusDescendant(this); + + wxEvtHandler* evtHandler = focusWin ? focusWin->GetEventHandler() : GetEventHandler(); + + evtHandler->ProcessEvent(commandEvent); } // Checks if there is a toolbar, and returns the first free client position