Skip to content

[win32] Multi-window should never have implicit view - #193174

Merged
auto-submit[bot] merged 2 commits into
flutter:masterfrom
knopp:windows_view_id
Sep 23, 2026
Merged

auto-submit[bot] merged 2 commits into
flutter:masterfrom
knopp:windows_view_id

Conversation

@knopp

@knopp knopp commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Right now the first window of a multi-window application on win32 will have view_id = 0, which is wrong, as it prevents view removal when the window closes (implicit views don't get removed).

This PR preserves existing behavior where the legacy single view FlutterViewController will have an implicit view.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@knopp
knopp requested a review from a team as a code owner September 22, 2026 20:11
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Sep 22, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an allow_implicit_view parameter to FlutterWindowsEngine::CreateView to control whether the implicit view ID is allowed when creating a view, updating various platform files and unit tests accordingly. The review feedback points out a style guide violation in host_window.cc regarding the spacing in the inline parameter comment /* allow_implicit_view=*/false and suggests formatting it as /*allow_implicit_view=*/false.

@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. platform-windows Building on or for Windows specifically a: desktop Running on desktop team-windows Owned by the Windows platform team labels Sep 22, 2026

@mattkae mattkae left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sounds good to me 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop CICD Run CI/CD engine flutter/engine related. See also e: labels. platform-windows Building on or for Windows specifically team-windows Owned by the Windows platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants