mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-02-03 09:44:26 -05:00
Windows focus tweak
This commit is contained in:
parent
640b4bb219
commit
b8568639c3
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user