1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

Bug2064: ESC key should abort drags in time ruler on Linux...

... Reimplement the ESC key handling in TrackPanel and time ruler on all
operating systems so that it does not rely on the focused window, but instead
uses the application-wide event filter.

This includes reversion of 9491605cfc
This commit is contained in:
Paul Licameli
2019-02-10 10:31:10 -05:00
parent b47e2f91e2
commit 02db402b54
8 changed files with 75 additions and 57 deletions

View File

@@ -644,11 +644,6 @@ void TrackPanel::UpdateStatusMessage( const wxString &st )
mListener->TP_DisplayStatusMessage(status);
}
bool TrackPanel::TakesFocus() const
{
return true;
}
void TrackPanel::UpdateSelectionDisplay()
{
// Full refresh since the label area may need to indicate
@@ -1188,7 +1183,8 @@ void TrackPanel::DrawEverythingElse(TrackPanelDrawingContext &context,
// if (GetFocusedTrack() != NULL) {
// the highlight was reportedly drawn even when something else
// was the focus and no highlight should be drawn. -RBD
if (GetFocusedTrack() != NULL && GetProject()->IsFocused( this )) {
if (GetFocusedTrack() != NULL &&
wxWindow::FindFocus() == this ) {
HighlightFocusedTrack(dc, focusRect);
}