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

Refactoring: focus handling #1294

Merged
merged 10 commits into from Sep 14, 2020
Merged

Conversation

toaster
Copy link
Member

@toaster toaster commented Sep 8, 2020

Description:

This moves the handling of focused objects from canvas into the FocusManager.
It is a preparation for upcoming fixes of focus issues like #814 and #948.

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

The FocusManager no longer knows about the canvas.
Instead the canvas creates a new FocusManager when its content is set.
The canvas accesses its FocusManager to focus/unfocus objects.
@toaster toaster changed the base branch from master to develop September 8, 2020 10:26
stuartmscott
stuartmscott previously approved these changes Sep 9, 2020
Copy link
Member

@stuartmscott stuartmscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

With the move of focus next/previous to FocusManager the action
lost the ability to notify the Focusable.
This commit restores it and adds appropriate tests.
@toaster toaster merged commit 4cd6804 into fyne-io:develop Sep 14, 2020
@toaster toaster deleted the refactoring/focus_handling branch September 14, 2020 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants