Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter Analysis doesn't grab Kbd Focus on open #7461

Merged
merged 1 commit into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/surge-xt/gui/overlays/FilterAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ struct FilterAnalysis : public OverlayComponent, Surge::GUI::SkinConsumingCompon
int whichFilter{0};
void selectFilter(int which);

bool wantsInitialKeyboardFocus() const override { return false; }

std::unique_ptr<Surge::Widgets::SelfDrawToggleButton> f1Button, f2Button;
std::unique_ptr<FilterAnalysisEvaluator> evaluator;
bool shouldRepaintOnParamChange(const SurgePatch &patch, Parameter *p) override;
Expand Down
2 changes: 0 additions & 2 deletions src/surge-xt/gui/overlays/Oscilloscope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1243,8 +1243,6 @@ void Oscilloscope::visibilityChanged()
}
}

bool Oscilloscope::wantsInitialKeyboardFocus() { return false; }

// Lock for member variables must be held by the caller.
void Oscilloscope::calculateSpectrumData()
{
Expand Down
2 changes: 1 addition & 1 deletion src/surge-xt/gui/overlays/Oscilloscope.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class Oscilloscope : public OverlayComponent,
void resized() override;
void updateDrawing();
void visibilityChanged() override;
bool wantsInitialKeyboardFocus() override;
bool wantsInitialKeyboardFocus() const override { return false; }

void valueChanged(GUI::IComponentTagValue *p) override{};
int32_t controlModifierClicked(Surge::GUI::IComponentTagValue *pControl,
Expand Down
2 changes: 1 addition & 1 deletion src/surge-xt/gui/overlays/OverlayComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct OverlayComponent : juce::Component
virtual void forceDataRefresh() {}

// For A11Y: should the overlay be granted keyboard focus as soon as it appears.
virtual bool wantsInitialKeyboardFocus() { return true; }
virtual bool wantsInitialKeyboardFocus() const { return true; }

/*
* This is called when a parent wrapper finally decides to show me, which will
Expand Down