Mark `wxEVT_KEY_DOWN` as processed in `wxvbamApp` (#1424)
This prevents wxWidgets from triggering the alert sound on macOS. There should be no side effect from this. Fixes #1384
This commit is contained in:
parent
57211ddc77
commit
3fdc30f7d7
|
@ -1409,3 +1409,12 @@ int wxvbamApp::FilterEvent(wxEvent& event)
|
|||
|
||||
return user_input_event.FilterProcessedInput(user_input.value());
|
||||
}
|
||||
|
||||
bool wxvbamApp::ProcessEvent(wxEvent& event) {
|
||||
if (event.GetEventType() == wxEVT_KEY_DOWN) {
|
||||
// Mark the event as processed. This prevents wxWidgets from firing alerts on macOS.
|
||||
// See https://github.com/wxWidgets/wxWidgets/issues/25262 for details.
|
||||
return true;
|
||||
}
|
||||
return wxApp::ProcessEvent(event);
|
||||
}
|
||||
|
|
|
@ -84,6 +84,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
}
|
||||
bool ProcessEvent(wxEvent& event) final;
|
||||
|
||||
wxString GetConfigDir();
|
||||
wxString GetDataDir();
|
||||
|
|
Loading…
Reference in New Issue