Set the menu itself as event object for EVT_MENU_{OPEN,CLOSED} in wxMSW.

Make wxMSW consistent with the other ports and set the menu itself, not the
window it is attached to, as the event object for the menu open/close events.

See #1595.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-04-05 22:27:36 +00:00
parent 4936c09982
commit 525454303e
2 changed files with 5 additions and 1 deletions

View File

@@ -854,7 +854,7 @@ bool
wxFrame::DoSendMenuOpenCloseEvent(wxEventType evtType, wxMenu* menu, bool popup)
{
wxMenuEvent event(evtType, popup ? wxID_ANY : 0, menu);
event.SetEventObject(this);
event.SetEventObject(menu);
return HandleWindowEvent(event);
}