diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index 38c74f1..aeb71b4 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -1490,6 +1490,12 @@ void AppFrame::OnIdle(wxIdleEvent& event) { } #endif +#ifdef _WIN32 + if (scopeCanvas->HasFocus() || spectrumCanvas->HasFocus()) { + waterfallCanvas->SetFocus(); + } +#endif + if (!this->IsActive()) { std::this_thread::sleep_for(std::chrono::milliseconds(30)); } else { diff --git a/src/visual/SpectrumCanvas.cpp b/src/visual/SpectrumCanvas.cpp index 42877bd..69d0e00 100644 --- a/src/visual/SpectrumCanvas.cpp +++ b/src/visual/SpectrumCanvas.cpp @@ -260,11 +260,9 @@ void SpectrumCanvas::OnMouseEnterWindow(wxMouseEvent& event) { InteractiveCanvas::OnMouseEnterWindow(event); SetCursor(wxCURSOR_SIZEWE); #ifdef _WIN32 - if (waterfallCanvas) { - if (wxGetApp().getAppFrame()->canFocus()) { - this->SetFocus(); - } - } + if (wxGetApp().getAppFrame()->canFocus()) { + this->SetFocus(); + } #endif }