mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-11 17:13:37 +02:00
Fixes the real issue described by bug #57.
http://bugzilla.audacityteam.org/show_bug.cgi?id=57
This commit is contained in:
@@ -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()
|
||||
|
@@ -98,6 +98,10 @@ class AudacityApp:public wxApp {
|
||||
virtual int OnExit(void);
|
||||
virtual void OnFatalException();
|
||||
|
||||
#if defined(__WXGTK__)
|
||||
int FilterEvent(wxEvent & event);
|
||||
#endif
|
||||
|
||||
void InitLang( const wxString & lang );
|
||||
|
||||
// These are currently only used on Mac OS, where it's
|
||||
|
Reference in New Issue
Block a user