Forward events to active child at MSW, not wx, level in wxMDIParentFrame.
We want to handle menu (and toolbar) events in the active MDI child before handling them in the parent frame itself and the existing code achieved this by forwarding wxEVT_MENU events at wx event processing level to the active child. However this was not enough as the underlying MSW WM_COMMAND message was still sent to the parent frame only and this could result in wx event not being generated at all if the parent frame had a disabled menu item with the same ID as (an enabled) item in the child frame, see #14314. So forward WM_COMMAND directly to ensure that the correct window gets the event in the first place. And this makes wxEVT_MENU forwarding in TryBefore() unnecessary. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -110,9 +110,6 @@ public:
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
protected:
|
||||
// override to pass menu/toolbar events to the active child first
|
||||
virtual bool TryBefore(wxEvent& event);
|
||||
|
||||
#if wxUSE_MENUS_NATIVE
|
||||
virtual void InternalSetMenuBar();
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
Reference in New Issue
Block a user