forked from flutter/flutter
-
Notifications
You must be signed in to change notification settings - Fork 1
[framework] add window.dart API and supporting examples for regular windows #36
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 tasks
This reverts commit 1070b86.
…n the same view collection
…n the same view collection (#38) This PR updates the reference app so that the root view of a regular window stays in the topmost view collection instead of being anchored to the view of the main window. This ensures that the `FocusTraversalGroup` of the root view is a child of the root focus scope rather than a nested scope. Why does this matter? Because it fixes an issue where focus sometimes switches back and forth indefinitely between two regular windows. Specifically, the issue occurs when switching focus from a root view A to a root view B while B's focus scope is nested in A's focus scope. When the user activates the top-level window with root view B and the focus goes to B, A's `View::_scopeFocusChangeListener` detects that the focused scope does not match the newly focused view (B) and requests a focus change back to A. However, when A regains focus, B's `View::_scopeFocusChangeListener` then notices that B is not focused while its scope node is (since it's inside A's scope) and requests a focus change to B, restarting the loop.
9 tasks
github-merge-queue bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Mar 20, 2025
…pdateSemantics (#164577) fixes #112207 ## What's new? - Added a `view_id` on `UpdateSemantics` - Added a `view_id` on `DispatchSemanticsAction` - Piped the `view_id` all over creation - Updated tests for these actions across the different platforms - Added `FlutterEngineSendSemanticsAction` to the embedder API in order to not break `FlutterEngineDispatchSemanticsAction` - Using this view ID properly on the Windows platform (see `engine/src/flutter/shell/platform/windows/flutter_windows_engine.cc`) ## How to test 1. Checkout [foundation-plus-framework](canonical#36) from canonical/flutter 2. Merge this branch into it 3. Enable the "Narrator" screen reader on windows 4. Run the Multi window reference app (see [PR](canonical#36) for details) 5. Open up another window, and note that the right buttons and things are being highlighted, as the screenreader would expect 🎉 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
github-merge-queue bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Mar 20, 2025
…pdateSemantics (#164577) fixes #112207 ## What's new? - Added a `view_id` on `UpdateSemantics` - Added a `view_id` on `DispatchSemanticsAction` - Piped the `view_id` all over creation - Updated tests for these actions across the different platforms - Added `FlutterEngineSendSemanticsAction` to the embedder API in order to not break `FlutterEngineDispatchSemanticsAction` - Using this view ID properly on the Windows platform (see `engine/src/flutter/shell/platform/windows/flutter_windows_engine.cc`) ## How to test 1. Checkout [foundation-plus-framework](canonical#36) from canonical/flutter 2. Merge this branch into it 3. Enable the "Narrator" screen reader on windows 4. Run the Multi window reference app (see [PR](canonical#36) for details) 5. Open up another window, and note that the right buttons and things are being highlighted, as the screenreader would expect 🎉 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
zhangyuang
pushed a commit
to zhangyuang/flutter-fork
that referenced
this pull request
Jun 9, 2025
…n and UpdateSemantics (flutter#164577) fixes flutter#112207 ## What's new? - Added a `view_id` on `UpdateSemantics` - Added a `view_id` on `DispatchSemanticsAction` - Piped the `view_id` all over creation - Updated tests for these actions across the different platforms - Added `FlutterEngineSendSemanticsAction` to the embedder API in order to not break `FlutterEngineDispatchSemanticsAction` - Using this view ID properly on the Windows platform (see `engine/src/flutter/shell/platform/windows/flutter_windows_engine.cc`) ## How to test 1. Checkout [foundation-plus-framework](canonical#36) from canonical/flutter 2. Merge this branch into it 3. Enable the "Narrator" screen reader on windows 4. Run the Multi window reference app (see [PR](canonical#36) for details) 5. Open up another window, and note that the right buttons and things are being highlighted, as the screenreader would expect 🎉 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
romanejaquez
pushed a commit
to romanejaquez/flutter
that referenced
this pull request
Aug 14, 2025
…n and UpdateSemantics (flutter#164577) fixes flutter#112207 ## What's new? - Added a `view_id` on `UpdateSemantics` - Added a `view_id` on `DispatchSemanticsAction` - Piped the `view_id` all over creation - Updated tests for these actions across the different platforms - Added `FlutterEngineSendSemanticsAction` to the embedder API in order to not break `FlutterEngineDispatchSemanticsAction` - Using this view ID properly on the Windows platform (see `engine/src/flutter/shell/platform/windows/flutter_windows_engine.cc`) ## How to test 1. Checkout [foundation-plus-framework](canonical#36) from canonical/flutter 2. Merge this branch into it 3. Enable the "Narrator" screen reader on windows 4. Run the Multi window reference app (see [PR](canonical#36) for details) 5. Open up another window, and note that the right buttons and things are being highlighted, as the screenreader would expect 🎉 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Design doc: https://docs.google.com/document/d/1eQG-IS7r4_S9_h50MY_hSGwUVtgSTRSLzu7MLzPNd2Y/edit?tab=t.0
To test
Don't forget the
--enable-multi-windowflag or it will not workWhat's new?
Framework
Created a new library called
window.dartExposed the following symbols in
window.dart:Added the ability to create regular windows using the
RegularWindowControllerand display them in the widget tree using theRegularWindowAdded
window_test.dartunit tests for all of the above functionalityAdded a new example
examples/multi_window_ref_appwhich provides a test application for creating regular windowsPre-launch Checklist
///).