Skip to content

Allow windows to be created undecorated#179859

Merged
robert-ancell merged 23 commits into
flutter:masterfrom
robert-ancell:undecorated-windows
Mar 20, 2026
Merged

Allow windows to be created undecorated#179859
robert-ancell merged 23 commits into
flutter:masterfrom
robert-ancell:undecorated-windows

Conversation

@robert-ancell

@robert-ancell robert-ancell commented Dec 14, 2025

Copy link
Copy Markdown
Contributor

This will be useful when we want to render all the window decorations using Flutter.

Fixes #183557

This will be useful when we want to render all the window decorations using Flutter.
@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@robert-ancell robert-ancell marked this pull request as draft December 14, 2025 23:49
@github-actions github-actions Bot added 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 platform-macos labels Dec 14, 2025

@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 the functionality to create undecorated windows across macOS, Windows, and Linux platforms. The changes are well-structured, touching native code for each platform as well as the Dart framework layer to expose the new decorated property. While the implementation is largely correct, I've identified a few critical issues on Windows and macOS that need to be addressed. These include incorrect argument ordering in a function call on Windows and a missing parameter in a method on macOS, which could lead to incorrect behavior or build failures. There is also a minor logic issue with window styles for undecorated dialogs on Windows.

Comment thread engine/src/flutter/shell/platform/windows/window_manager.cc Outdated
Comment thread engine/src/flutter/shell/platform/windows/host_window_dialog.cc
@robert-ancell

Copy link
Copy Markdown
Contributor Author

I've just guessed the Win32/MacOS APIs from documentation, so please check if these actually work!

@github-actions github-actions Bot added the a: tests "flutter test", flutter_test, or one of our tests label Dec 16, 2025
@robert-ancell

robert-ancell commented Dec 16, 2025

Copy link
Copy Markdown
Contributor Author

See #179964 for related PR to allow window moving and resizing.

@robert-ancell robert-ancell marked this pull request as ready for review February 26, 2026 23:17

@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 the ability to create undecorated windows across macOS, Windows, and Linux platforms by adding a decorated flag to the window creation APIs. The changes are propagated from the engine level up to the public Dart API in _window.dart. The example application is also updated to demonstrate this new feature.

My review focuses on ensuring the correct use of the new APIs, code clarity, and adherence to documentation standards. I've identified a minor issue in the example application and suggested some code simplifications for better readability in the Linux implementation. I've also pointed out missing documentation for the new public API parameters.

Comment thread examples/multiple_windows/lib/app/main_window.dart Outdated
Comment thread packages/flutter/lib/src/widgets/_window.dart
Comment thread packages/flutter/lib/src/widgets/_window.dart
Comment thread packages/flutter/lib/src/widgets/_window_linux.dart Outdated
Comment thread packages/flutter/lib/src/widgets/_window_linux.dart Outdated
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 21, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 22, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 22, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 23, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 23, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 23, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 23, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 24, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 24, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 24, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 24, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 24, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 24, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 25, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 25, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 25, 2026
mboetger pushed a commit to mboetger/flutter that referenced this pull request Mar 26, 2026
This will be useful when we want to render all the window decorations
using Flutter.

Fixes flutter#183557
ahmedsameha1 pushed a commit to ahmedsameha1/flutter that referenced this pull request Apr 14, 2026
This will be useful when we want to render all the window decorations
using Flutter.

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

Labels

a: tests "flutter test", flutter_test, or one of our tests CICD Run CI/CD d: examples Sample code and demos framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add API to enable undecorated windows

4 participants