1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-04 09:39:42 +02:00

Bug1365: Do not confuse Linux key event handling...

... So click on QP during scrub had to be implemented without relying on
SafeYield() when stopping play.
This commit is contained in:
Paul Licameli 2016-05-18 10:08:46 -04:00
parent 3c5547f0f3
commit 465b743fd3
2 changed files with 10 additions and 5 deletions

View File

@ -2293,9 +2293,7 @@ void AudioIO::StopStream()
while( mAudioThreadShouldCallFillBuffersOnce == true )
{
// LLL: Experienced recursive yield here...once.
// PRL: Made it safe yield to avoid a certain recursive event processing in the
// time ruler when switching from scrub to quick play.
wxGetApp().SafeYield(nullptr, true); // Pass true for onlyIfNeeded to avoid recursive call error.
wxGetApp().Yield(true); // Pass true for onlyIfNeeded to avoid recursive call error.
if (mScrubQueue)
mScrubQueue->Nudge();
wxMilliSleep( 50 );

View File

@ -2404,12 +2404,19 @@ void AdornedRulerPanel::OnMouseEvents(wxMouseEvent &evt)
;
else if (zone == StatusChoice::EnteringQP &&
mQuickPlayEnabled &&
evt.LeftDown()) {
evt.LeftUp()) {
// Stop scrubbing
if (HasCapture())
ReleaseMouse();
mProject->OnStop();
// Continue to quick play event handling
// Simulate a new click in the same place
evt.SetEventType(wxEVT_LEFT_DOWN);
this->AddPendingEvent(evt);
evt.SetEventType(wxEVT_LEFT_UP);
this->AddPendingEvent(evt);
return;
}
else {
// If already clicked for scrub, preempt the usual event handling,