X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e306597309a120f2ae91385c731a5cb2722c52aa..fd128b0c3ab84380d782e45bfa98f181a848df27:/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