Forward key down/up events from wxCompositeWindow children too

There doesn't seem to be any reason to only forward CHAR events, but not
KEY_{DOWN,UP} ones, so do the same thing for the latter ones too.

This allows to get rid of GetMainWindow() call in wxDataViewCtrl unit
tests, as wxEVT_KEY_DOWN are now correctly received in the control
itself and not just its main window.
This commit is contained in:
Vadim Zeitlin
2021-05-23 14:32:39 +01:00
parent 3ed930c736
commit f16b502f66
2 changed files with 7 additions and 3 deletions

View File

@@ -423,7 +423,7 @@ TEST_CASE_METHOD(SingleSelectDataViewCtrlTestCase,
if ( !EnableUITests() )
return;
EventCounter keyEvents(m_dvc->GetMainWindow(), wxEVT_KEY_DOWN);
EventCounter keyEvents(m_dvc, wxEVT_KEY_DOWN);
m_dvc->SetFocus();