mirror of
https://github.com/cookiengineer/audacity
synced 2026-04-25 23:44:13 +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);
|
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
|
// The `main program' equivalent, creating the windows and returning the
|
||||||
// main frame
|
// main frame
|
||||||
bool AudacityApp::OnInit()
|
bool AudacityApp::OnInit()
|
||||||
|
|||||||
@@ -98,6 +98,10 @@ class AudacityApp:public wxApp {
|
|||||||
virtual int OnExit(void);
|
virtual int OnExit(void);
|
||||||
virtual void OnFatalException();
|
virtual void OnFatalException();
|
||||||
|
|
||||||
|
#if defined(__WXGTK__)
|
||||||
|
int FilterEvent(wxEvent & event);
|
||||||
|
#endif
|
||||||
|
|
||||||
void InitLang( const wxString & lang );
|
void InitLang( const wxString & lang );
|
||||||
|
|
||||||
// These are currently only used on Mac OS, where it's
|
// These are currently only used on Mac OS, where it's
|
||||||
|
|||||||
Reference in New Issue
Block a user