Skip to content

Implementation of popup windows for Win32#184516

Merged
mattkae merged 13 commits into
flutter:masterfrom
canonical:feature/popups_win32
Apr 17, 2026
Merged

Implementation of popup windows for Win32#184516
mattkae merged 13 commits into
flutter:masterfrom
canonical:feature/popups_win32

Conversation

@mattkae

@mattkae mattkae commented Apr 2, 2026

Copy link
Copy Markdown
Contributor
image

What's new?

  • Implement popup windows for the Win32 platform
  • Add unit tests for popup windows similar to tooltip windows
  • Made the TestInput.clearClient method not return an error if we don't have the view any more (WARNING: this may be controversial 😄 I am down for more investigation if we hate it)

To test

  1. Run the multiple_windows example app against the engine
  2. Click "Show Popup" and see the resizing popup
  3. Type some text into the input of the resizing popup
  4. Successfully interact with widgets in the main window while the popup is open
  5. Close the popup by focusing some other window

Pre-launch Checklist

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

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.

@github-actions github-actions Bot added a: tests "flutter test", flutter_test, or one of our tests a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. engine flutter/engine related. See also e: labels. platform-windows Building on or for Windows specifically d: examples Sample code and demos a: desktop Running on desktop team-macos Owned by the macOS platform team team-windows Owned by the Windows platform team platform-macos and removed a: tests "flutter test", flutter_test, or one of our tests a: text input Entering text in a text field or keyboard related problems d: examples Sample code and demos team-macos Owned by the macOS platform team platform-macos labels Apr 2, 2026
@mattkae mattkae force-pushed the feature/popups_win32 branch from a726c3d to f62c675 Compare April 2, 2026 17:52
@mattkae mattkae changed the title Feature/popups win32 Implementation of popup windows for Win32 Apr 2, 2026
@mattkae mattkae added the CICD Run CI/CD label Apr 7, 2026
@github-actions github-actions Bot added a: text input Entering text in a text field or keyboard related problems and removed CICD Run CI/CD labels Apr 7, 2026
@mattkae mattkae added the CICD Run CI/CD label Apr 7, 2026
@mattkae mattkae dismissed stale reviews from loic-sharma and justinmc via 4f04daf April 17, 2026 12:57
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 17, 2026
@github-actions github-actions Bot removed the a: text input Entering text in a text field or keyboard related problems label Apr 17, 2026
@github-actions github-actions Bot added the a: text input Entering text in a text field or keyboard related problems label Apr 17, 2026
@mattkae mattkae added the CICD Run CI/CD label Apr 17, 2026
@mattkae

mattkae commented Apr 17, 2026

Copy link
Copy Markdown
Contributor Author

LGTM, but FYI I think the following are things we should address, though perhaps in follow-up PRs:

1. Windows embedder cleans the text input plugin state when a view is destroyed

2. Avoid deallocating memory in the embedder that was allocated by the framework, and vice-versa.

I update 1 here, since its very relevant.

Let's do 2 in a follow up :)

@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 17, 2026
@mattkae mattkae added the CICD Run CI/CD label Apr 17, 2026

@justinmc justinmc 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.

LGTM 👍

Comment thread engine/src/flutter/shell/platform/windows/flutter_windows_engine.cc
Comment thread examples/multiple_windows/lib/app/regular_window_content.dart
Comment thread packages/flutter/lib/src/widgets/_window_win32.dart
Comment thread packages/flutter/lib/src/widgets/_window_win32.dart
@mattkae mattkae enabled auto-merge April 17, 2026 17:18
@mattkae mattkae disabled auto-merge April 17, 2026 17:18
@mattkae mattkae enabled auto-merge April 17, 2026 17:50
@mattkae mattkae dismissed robert-ancell’s stale review April 17, 2026 17:50

I want to merge this :)

@mattkae mattkae added this pull request to the merge queue Apr 17, 2026
Merged via the queue into flutter:master with commit db976c1 Apr 17, 2026
194 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 18, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 18, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 19, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 19, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Apr 20, 2026
flutter/flutter@8e8a194...2844af6

2026-04-19 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from bWoigpGIb60B6C7hD... to aDbXQm6WA0wFCAUp-... (flutter/flutter#185253)
2026-04-18 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from di3JdYrdE9OFu8Iyl... to bWoigpGIb60B6C7hD... (flutter/flutter#185231)
2026-04-18 rmolivares@renzo-olivares.dev Fix: text selection context menu should reappear after a non-fling scroll on Android and iOS (flutter/flutter#185054)
2026-04-18 flar@google.com Rect constructors for circle bounds (MakeCircle/EllipseBounds) (flutter/flutter#185110)
2026-04-17 97480502+b-luk@users.noreply.github.com Change uber SDF to get pixel size (for AA) using euclidean distance rather than manhattan distance. (flutter/flutter#184984)
2026-04-17 engine-flutter-autoroll@skia.org Roll Dart SDK from 7c2564c18770 to 9648f446f131 (7 revisions) (flutter/flutter#185223)
2026-04-17 47866232+chunhtai@users.noreply.github.com Rewrites no-response workflow to work with pr as well (flutter/flutter#185163)
2026-04-17 15619084+vashworth@users.noreply.github.com Only use LLDB breakpoint in debug mode (flutter/flutter#185158)
2026-04-17 flar@google.com add playground to test SDF primitive rendering under transforms (flutter/flutter#185010)
2026-04-17 30870216+gaaclarke@users.noreply.github.com Adds sdf rrects (and fixes opacity + color source) (flutter/flutter#184999)
2026-04-17 matt.kosarek@canonical.com Implementation of popup windows for Win32 (flutter/flutter#184516)
2026-04-17 engine-flutter-autoroll@skia.org Roll Fuchsia Test Scripts from R2EllDf4DgBXVNuiN... to dQ4PjIJB5kZFU8Y32... (flutter/flutter#185207)
2026-04-17 chris@bracken.jp [iOS] Update previousCompositionOrder to return Obj-C type (flutter/flutter#185136)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC boetger@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
…r#11531)

flutter/flutter@8e8a194...2844af6

2026-04-19 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from bWoigpGIb60B6C7hD... to aDbXQm6WA0wFCAUp-... (flutter/flutter#185253)
2026-04-18 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from di3JdYrdE9OFu8Iyl... to bWoigpGIb60B6C7hD... (flutter/flutter#185231)
2026-04-18 rmolivares@renzo-olivares.dev Fix: text selection context menu should reappear after a non-fling scroll on Android and iOS (flutter/flutter#185054)
2026-04-18 flar@google.com Rect constructors for circle bounds (MakeCircle/EllipseBounds) (flutter/flutter#185110)
2026-04-17 97480502+b-luk@users.noreply.github.com Change uber SDF to get pixel size (for AA) using euclidean distance rather than manhattan distance. (flutter/flutter#184984)
2026-04-17 engine-flutter-autoroll@skia.org Roll Dart SDK from 7c2564c18770 to 9648f446f131 (7 revisions) (flutter/flutter#185223)
2026-04-17 47866232+chunhtai@users.noreply.github.com Rewrites no-response workflow to work with pr as well (flutter/flutter#185163)
2026-04-17 15619084+vashworth@users.noreply.github.com Only use LLDB breakpoint in debug mode (flutter/flutter#185158)
2026-04-17 flar@google.com add playground to test SDF primitive rendering under transforms (flutter/flutter#185010)
2026-04-17 30870216+gaaclarke@users.noreply.github.com Adds sdf rrects (and fixes opacity + color source) (flutter/flutter#184999)
2026-04-17 matt.kosarek@canonical.com Implementation of popup windows for Win32 (flutter/flutter#184516)
2026-04-17 engine-flutter-autoroll@skia.org Roll Fuchsia Test Scripts from R2EllDf4DgBXVNuiN... to dQ4PjIJB5kZFU8Y32... (flutter/flutter#185207)
2026-04-17 chris@bracken.jp [iOS] Update previousCompositionOrder to return Obj-C type (flutter/flutter#185136)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC boetger@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop a: text input Entering text in a text field or keyboard related problems CICD Run CI/CD d: examples Sample code and demos engine flutter/engine related. See also e: labels. framework flutter/packages/flutter repository. See also f: 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.

4 participants