X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e306597309a120f2ae91385c731a5cb2722c52aa..6e5fefdf863aa639a1f763f88232e2ef3e598e15:/src/mac/frame.cpp 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