1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-12 22:57:43 +02:00

Bug 2115 - Linux: Track focus lost on selecting effect

This commit is contained in:
Leland Lucius 2020-03-10 08:13:44 -05:00
parent 72e24b82d2
commit 76c79cb910
2 changed files with 0 additions and 46 deletions

View File

@ -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<wxActivateEvent &>(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

View File

@ -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.