1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 16:37:12 +01:00

Fixes the real issue described by bug #57.

http://bugzilla.audacityteam.org/show_bug.cgi?id=57
This commit is contained in:
lllucius
2013-10-11 20:00:47 +00:00
parent a1fe886b43
commit 401ca077e2
2 changed files with 27 additions and 0 deletions

View File

@@ -990,6 +990,29 @@ void AudacityApp::OnFatalException()
exit(-1);
}
#if 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
//
int AudacityApp::FilterEvent(wxEvent & event)
{
if (event.GetEventType() == wxEVT_ACTIVATE)
{
wxActivateEvent & e = (wxActivateEvent &) event;
if (e.GetEventObject() && e.GetActive())
{
((wxWindow *)e.GetEventObject())->SetFocus();
}
}
return -1;
}
#endif
// The `main program' equivalent, creating the windows and returning the
// main frame
bool AudacityApp::OnInit()