Skip to content

Close Linux popups when their parent loses focuses - #196825

Merged
auto-submit[bot] merged 3 commits into
flutter:masterfrom
canonical:linux-close-popups-on-focus-lost
Nov 19, 2026
Merged

auto-submit[bot] merged 3 commits into
flutter:masterfrom
canonical:linux-close-popups-on-focus-lost

Conversation

@mattkae

@mattkae mattkae commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

What's new?

Popups on Linux should close when another toplevel that is not its ancestor is focused.

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant in-code documentation (doc comments with ///).
  • If this PR introduces a new feature or capability, I created and linked a website documentation issue or PR in [flutter/website] (or verified none is needed).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Nov 17, 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 implements automatic closing of Linux popup windows when their parent top-level window loses focus, and adds a corresponding integration test. The review feedback suggests checking if the top-level window is already destroyed before removing listeners in destroy or accessing its properties in _onToplevelChanged to prevent potential runtime errors.

robert-ancell
robert-ancell previously approved these changes Nov 17, 2026

@robert-ancell robert-ancell 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

@github-actions github-actions Bot added the framework flutter/packages/flutter repository. See also f: labels. label Nov 17, 2026
@mattkae mattkae added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 17, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 17, 2026
@auto-submit

auto-submit Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/196825, because - The status or check suite Presubmit has failed. Please fix the issues identified (or deflake) before re-applying this label.

@mattkae

mattkae commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

If the popup has a dialog descendant, it should NOT close when another window gains focus.

robert-ancell
robert-ancell previously approved these changes Nov 18, 2026

@robert-ancell robert-ancell 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.

Yep

@mattkae mattkae added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 19, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 19, 2026
@auto-submit

auto-submit Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/196825, because - The status or check suite Presubmit has failed. Please fix the issues identified (or deflake) before re-applying this label.

@mattkae
mattkae force-pushed the linux-close-popups-on-focus-lost branch from 2b51e18 to c51ce16 Compare November 19, 2026 13:21
@mattkae mattkae added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 19, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Nov 19, 2026
Merged via the queue into flutter:master with commit fc49dd4 Nov 19, 2026
21 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 19, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Nov 20, 2026
Roll Flutter from e8cc6f3451b7 to b34b017b48ad (36 revisions)

flutter/flutter@e8cc6f3...b34b017

2026-11-20 112435854+wenkaifan0720@users.noreply.github.com Fix OverflowBox dry layout when deferToChild overrides the constraints (flutter/flutter#196839)
2026-11-20 engine-flutter-autoroll@skia.org Roll Dart SDK from f118f476ebce to 3b5f45d812f8 (1 revision) (flutter/flutter#197048)
2026-11-20 matej.knopp@gmail.com [macOS] Register plugins in multiple_windows example (flutter/flutter#196068)
2026-11-20 engine-flutter-autoroll@skia.org Roll Skia from 87027a9d4659 to a1edf5c2ea5c (1 revision) (flutter/flutter#197045)
2026-11-20 evanwall@buffalo.edu Add highp directives to UberSDF to prevent overflow (flutter/flutter#196997)
2026-11-20 12701010+sero583@users.noreply.github.com [Impeller] Cap the Vulkan command pool recycler cache (flutter/flutter#194793)
2026-11-20 engine-flutter-autoroll@skia.org Roll Skia from 12610b69511d to 87027a9d4659 (4 revisions) (flutter/flutter#197037)
2026-11-20 saigklkrishnan@gmail.com [macOS] Unregister nil binary message handlers (flutter/flutter#193672)
2026-11-20 engine-flutter-autoroll@skia.org Roll Dart SDK from b803c3ec01de to f118f476ebce (2 revisions) (flutter/flutter#197034)
2026-11-20 engine-flutter-autoroll@skia.org Roll Skia from 2f1436ba8e64 to 12610b69511d (3 revisions) (flutter/flutter#197030)
2026-11-20 34871572+gmackall@users.noreply.github.com [Android] Do not use the HCPP external view embedder from its platform tasks (flutter/flutter#196490)
2026-11-20 engine-flutter-autoroll@skia.org Roll Dart SDK from 849e17ad3ae6 to b803c3ec01de (1 revision) (flutter/flutter#197012)
2026-11-20 860572040@qq.com [iOS a11y] Synchronize hit-test children when replacing semantics objects (flutter/flutter#196439)
2026-11-20 154381524+flutteractionsbot@users.noreply.github.com Sync CHANGELOG.md from stable (flutter/flutter#197019)
2026-11-19 bkonyi@google.com [flutter_tools] Reland "Extract Windows archives using native tar" (flutter/flutter#193515)
2026-11-19 bkonyi@google.com [Reland][flutter_tools] Migrate lib/runner.dart off runInContext and overrides (flutter/flutter#196931)
2026-11-19 okorohelijah@google.com Include assigned issues in Android incoming triage link (flutter/flutter#197008)
2026-11-19 bdero@google.com [Flutter GPU] Record on the UI thread, encode and submit on the raster thread (flutter/flutter#194882)
2026-11-19 34871572+gmackall@users.noreply.github.com Add Pixel 7 Pro Impeller benchmarks without fixed-performance mode (flutter/flutter#197010)
2026-11-19 magder@google.com Reduce time of uiscene_plugin_lifecycle_test_ios (flutter/flutter#196363)
2026-11-19 leehack@gmail.com [native assets] Respect Apple deployment targets (flutter/flutter#194146)
2026-11-19 chris@bracken.jp iOS: Represent platform view frames as FlutterPlatformViewFrames (flutter/flutter#196955)
2026-11-19 engine-flutter-autoroll@skia.org Roll Skia from 0bf961e4ff05 to 2f1436ba8e64 (3 revisions) (flutter/flutter#196999)
2026-11-19 okorohelijah@google.com [ios] Record OCMReject expectations before the stimulus in FlutterPluginAppLifeCycleDelegateTest (flutter/flutter#193011)
2026-11-19 okorohelijah@google.com Fix post-monorepo doc rot in docs/infra and dev/bots/README.md (flutter/flutter#193010)
2026-11-19 engine-flutter-autoroll@skia.org Roll Skia from c3567e170362 to 0bf961e4ff05 (4 revisions) (flutter/flutter#196994)
2026-11-19 matt.kosarek@canonical.com Close Linux popups when their parent loses focuses (flutter/flutter#196825)
2026-11-19 engine-flutter-autoroll@skia.org Roll Packages from dca2e58 to 81b7c44 (6 revisions) (flutter/flutter#196992)
2026-11-19 engine-flutter-autoroll@skia.org Roll Dart SDK from d8d40cf9c21b to 849e17ad3ae6 (1 revision) (flutter/flutter#196986)
2026-11-19 50643541+Mairramer@users.noreply.github.com Fix RouteObserver didPushNext not firing when routes are pushed synchronously (flutter/flutter#189057)
2026-11-19 17201053+M0n7y5@users.noreply.github.com [Impeller] Reuse render targets on text shadow cache misses (flutter/flutter#194769)
2026-11-19 engine-flutter-autoroll@skia.org Roll Skia from 81de64af9806 to c3567e170362 (3 revisions) (flutter/flutter#196982)
2026-11-19 30870216+gaaclarke@users.noreply.github.com Reland: "Move macOS desktop builds to ThinLTO" (flutter/flutter#196928)
2026-11-19 lukas.klingsbo@gmail.com [Linux] Desynchronize the Wayland subsurface so frames don't redraw the GTK window (flutter/flutter#195287)
2026-11-19 engine-flutter-autoroll@skia.org Roll Skia from 3dfb69d709c7 to 81de64af9806 (1 revision) (flutter/flutter#196975)
2026-11-19 116356835+AbdeMohlbi@users.noreply.github.com Update `ProxyAnimation.didStartListening` and `ProxyAnimation. didStopListening` to use dart's `Conditional member access` (flutter/flutter#195762)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC louisehsu@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:
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants