Windows focus tweak

This commit is contained in:
Charles J. Cliffe 2016-05-30 19:25:46 -04:00
parent 640b4bb219
commit b8568639c3
2 changed files with 9 additions and 5 deletions

View File

@ -1490,6 +1490,12 @@ void AppFrame::OnIdle(wxIdleEvent& event) {
} }
#endif #endif
#ifdef _WIN32
if (scopeCanvas->HasFocus() || spectrumCanvas->HasFocus()) {
waterfallCanvas->SetFocus();
}
#endif
if (!this->IsActive()) { if (!this->IsActive()) {
std::this_thread::sleep_for(std::chrono::milliseconds(30)); std::this_thread::sleep_for(std::chrono::milliseconds(30));
} else { } else {

View File

@ -260,11 +260,9 @@ void SpectrumCanvas::OnMouseEnterWindow(wxMouseEvent& event) {
InteractiveCanvas::OnMouseEnterWindow(event); InteractiveCanvas::OnMouseEnterWindow(event);
SetCursor(wxCURSOR_SIZEWE); SetCursor(wxCURSOR_SIZEWE);
#ifdef _WIN32 #ifdef _WIN32
if (waterfallCanvas) { if (wxGetApp().getAppFrame()->canFocus()) {
if (wxGetApp().getAppFrame()->canFocus()) { this->SetFocus();
this->SetFocus(); }
}
}
#endif #endif
} }