Fix event origin for wxEVT_CHAR from wxCompositeWindow children

Use the just added wxEventObjectOriginSetter to set the event object and
ID to that of wxCompositeWindow itself, rather than that of the child
window where the event had actually occurred.
This commit is contained in:
Vadim Zeitlin
2021-05-23 14:05:03 +01:00
parent 9a150ba486
commit fa00fd24f0

View File

@@ -223,6 +223,8 @@ private:
void OnChar(wxKeyEvent& event) void OnChar(wxKeyEvent& event)
{ {
wxEventObjectOriginSetter setThis(event, this, this->GetId());
if ( !this->ProcessWindowEvent(event) ) if ( !this->ProcessWindowEvent(event) )
event.Skip(); event.Skip();
} }