Don't use the accelerator table in the menubars
It appears that the root cause of #1941 (closed) is the accelerator table entries created by the menubar on MSW.
On MSW, the UI event loop (src/msw/evtloop.cpp:67
) will always try the accelerator table of a frame before passing the events to other handlers (this is the wnd->MSWTranslateMessage((WXMSG *)msg)
call on line 134). Inside that call for wxFrame types, it searches the menubar's accelerator table for a match. If it doesn't find one, then it continues processing. The wx accelerator table is added by default when the menubar is added to a frame (src/msw/menu.cpp:1235
), so I think we have to kill the created accelerator table in someway.
We can't just remove the accelerator table once, since our CONDITIONAL_MENU
objects in the menubar currently will recreate it whenever objects are added/removed from the menu. Instead, we can just override the menubar and ignore the passed in accelerator table when it is set - giving an empty one in its place.
CC @craftyjon @jeffyoung can you both give this a spin?