diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp index 591826d38..5bf04eab4 100644 --- a/src/AudacityApp.cpp +++ b/src/AudacityApp.cpp @@ -1141,50 +1141,6 @@ bool AudacityApp::OnExceptionInMainLoop() #pragma warning( pop ) #endif //_MSC_VER -int AudacityApp::FilterEvent(wxEvent & event) -{ - (void)event;// compiler food (stops unused parameter warning) -#if !wxCHECK_VERSION(3, 0, 0) && defined(__WXGTK__) - // On wxGTK, there's a focus issue where dialogs do not automatically pass focus - // to the first child. This means that you can use the keyboard to navigate within - // the dialog. Watching for the ACTIVATE event allows us to set the focus ourselves - // when each dialog opens. - // - // See bug #57 - // - if (event.GetEventType() == wxEVT_ACTIVATE) - { - wxActivateEvent & e = (wxActivateEvent &) event; - - if (e.GetEventObject() && e.GetActive() && e.GetEventObject()->IsKindOf(CLASSINFO(wxDialog))) - { - ((wxWindow *)e.GetEventObject())->SetFocus(); - } - } -#endif - - -#if defined(__WXMAC__) || defined(__WXGTK__) - if (event.GetEventType() == wxEVT_ACTIVATE) - { - wxActivateEvent & e = static_cast(event); - - const auto object = e.GetEventObject(); - if (object && e.GetActive() && - object->IsKindOf(CLASSINFO(wxWindow))) - { - const auto window = ((wxWindow *)e.GetEventObject()); - window->SetFocus(); -#if defined(__WXMAC__) - window->NavigateIn(); -#endif - } - } -#endif - - return Event_Skip; -} - AudacityApp::AudacityApp() { // Do not capture crashes in debug builds diff --git a/src/AudacityApp.h b/src/AudacityApp.h index c1310013b..6886d1d94 100644 --- a/src/AudacityApp.h +++ b/src/AudacityApp.h @@ -49,8 +49,6 @@ class AudacityApp final : public wxApp { void OnFatalException() override; bool OnExceptionInMainLoop() override; - int FilterEvent(wxEvent & event) override; - // These are currently only used on Mac OS, where it's // possible to have a menu bar but no windows open. It doesn't // hurt any other platforms, though.