Make wxEVT_CHAR_HOOK propagate upwards and send it to the window itself.

Send wxEVT_CHAR_HOOK events to the focused window itself but make them
propagatable to ensure that the parent windows (including the top level
parent) still get it. This still allows the TLW parent to intercept keyboard
handling in its child but allows the child (or an intermediate parent window)
to have some say in the matter.

See #9102.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-12-02 00:50:25 +00:00
parent f47a359113
commit 3a95f73c00
7 changed files with 47 additions and 34 deletions

View File

@@ -735,6 +735,8 @@ wxKeyEvent::wxKeyEvent(wxEventType type)
#if wxUSE_UNICODE
m_uniChar = WXK_NONE;
#endif
InitPropagation();
}
wxKeyEvent::wxKeyEvent(const wxKeyEvent& evt)
@@ -742,6 +744,8 @@ wxKeyEvent::wxKeyEvent(const wxKeyEvent& evt)
wxKeyboardState(evt)
{
DoAssignMembers(evt);
InitPropagation();
}
wxKeyEvent::wxKeyEvent(wxEventType eventType, const wxKeyEvent& evt)
@@ -751,6 +755,8 @@ wxKeyEvent::wxKeyEvent(wxEventType eventType, const wxKeyEvent& evt)
DoAssignMembers(evt);
m_eventType = eventType;
InitPropagation();
}
bool wxKeyEvent::IsKeyInCategory(int category) const