Fix menu event handlers calling order.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 4 May 2013 23:59:29 +0000 (23:59 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 4 May 2013 23:59:29 +0000 (23:59 +0000)
commit3bad8c39260b8bda7762b4aacd49346b46064a2a
tree6b18ecdf997124809b6d83ecdf0cbc40a4b19e18
parent0492f62e0bee1c391a4557f5af84b838430902a0
Fix menu event handlers calling order.

Pass the menu event to the window associated with the menu first, before
falling back on wxApp.

This required adding yet another flag to keep state in wxEvent but it seems to
be unavoidable as wxMenuBase::SendEvent() calls ProcessEvent() twice and we
must have some way to distinguish the first call from the second one.

Added a test case verifying that the menu events are indeed processed in the
expected order.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/event.h
src/common/event.cpp
src/common/menucmn.cpp
tests/events/propagation.cpp