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:
@@ -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
|
||||
|
Reference in New Issue
Block a user