Remove EnableTransparentWindowBackground because it did nothing important and because Windows 10 does not support DWMWA_SYSTEMBACKDROP_TYPE#187848
Conversation
…e it does not support DWMWA_SYSTEMBACKDROP_TYPE
There was a problem hiding this comment.
Code Review
This pull request restricts transparent window backgrounds to Windows 11 or newer by dynamically loading RtlGetVersion from ntdll.dll in WindowsProcTable and exposing an IsWindows11OrGreater helper. Feedback on the changes highlights a potential null pointer dereference and crash if ntdll.dll fails to load or if RtlGetVersion cannot be resolved, suggesting safe checks before assigning the function pointer.
| ntdll_ = fml::NativeLibrary::Create("ntdll.dll"); | ||
| rtl_get_version_ = ntdll_->ResolveFunction<RtlGetVersion_*>("RtlGetVersion"); |
There was a problem hiding this comment.
Calling ResolveFunction on ntdll_ without checking if fml::NativeLibrary::Create succeeded can lead to a null pointer dereference and crash if ntdll_ is null. Additionally, if ResolveFunction fails to find RtlGetVersion (returning nullptr), assigning it directly to rtl_get_version_ will result in rtl_get_version_.has_value() being true but containing a nullptr, which would cause a crash when called in IsWindows11OrGreater.
We should safely check ntdll_ and only populate rtl_get_version_ if the resolved function pointer is non-null.
ntdll_ = fml::NativeLibrary::Create("ntdll.dll");
if (ntdll_) {
auto rtl_get_version =
ntdll_->ResolveFunction<RtlGetVersion_*>( "RtlGetVersion" );
if (rtl_get_version) {
rtl_get_version_ = rtl_get_version;
}
}|
CC: @9AZX |
This reverts commit 01ee175.
flutter/flutter@8bdce07...b7cb925 2026-06-12 engine-flutter-autoroll@skia.org Roll Skia from cadbde1ec4b7 to 8c89bf2b0ee3 (5 revisions) (flutter/flutter#187926) 2026-06-12 engine-flutter-autoroll@skia.org Roll Packages from 1b56cde to b78ad83 (5 revisions) (flutter/flutter#187928) 2026-06-12 engine-flutter-autoroll@skia.org Roll Dart SDK from f3441f2067ae to f6c31f4c3a63 (17 revisions) (flutter/flutter#187924) 2026-06-12 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 2KosSR4ONUjIB7tP_... to A3eaUn9mQ_EkSNxVI... (flutter/flutter#187923) 2026-06-12 engine-flutter-autoroll@skia.org Roll Skia from a2228b926c68 to cadbde1ec4b7 (9 revisions) (flutter/flutter#187921) 2026-06-12 kustermann@google.com Remove dynamic module loading code in flutter web engine (flutter/flutter#187777) 2026-06-12 matt.kosarek@canonical.com Remove EnableTransparentWindowBackground because it did nothing important and because Windows 10 does not support DWMWA_SYSTEMBACKDROP_TYPE (flutter/flutter#187848) 2026-06-12 engine-flutter-autoroll@skia.org Roll Fuchsia Test Scripts from dQ4PjIJB5kZFU8Y32... to EmfiOMUge_nnNS33B... (flutter/flutter#187912) 2026-06-12 mvincentong@gmail.com Clarify RichText selection docs (flutter/flutter#186844) 2026-06-12 1063596+reidbaker@users.noreply.github.com Custom KGP task and migration to AGP api for geting kgp version (flutter/flutter#182788) 2026-06-12 engine-flutter-autoroll@skia.org Roll Skia from f61acb31edf8 to a2228b926c68 (5 revisions) (flutter/flutter#187896) 2026-06-12 bdero@google.com [Flutter GPU] Expose ASTC HDR texture formats (flutter/flutter#187715) 2026-06-12 awolff@google.com Expand coverage of android_hardware_smoke_test. Add image, text, blend mode, and blur tests. (flutter/flutter#187600) 2026-06-11 bdero@google.com [Flutter GPU] Add blit operations (flutter/flutter#187289) 2026-06-11 bkonyi@google.com [flutter_tools] Fix version cache git fallback performance regression (flutter/flutter#187400) 2026-06-11 nshahan@google.com Rewrite `-d web-server` hot reload/restart tests (flutter/flutter#187453) 2026-06-11 bdero@google.com [Impeller] Allow sampling textures with manually-uploaded mip levels (flutter/flutter#187729) 2026-06-11 154381524+flutteractionsbot@users.noreply.github.com Sync CHANGELOG.md from stable (flutter/flutter#187884) 2026-06-11 47866232+chunhtai@users.noreply.github.com iOS a11y sets header trait based on heading level (flutter/flutter#186916) 2026-06-11 engine-flutter-autoroll@skia.org Roll Skia from 9f02102df298 to f61acb31edf8 (19 revisions) (flutter/flutter#187869) 2026-06-11 engine-flutter-autoroll@skia.org Roll ICU from ee5f27adc28b to d578f2e8b7bd (8 revisions) (flutter/flutter#187829) 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 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: 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
…tant and because Windows 10 does not support DWMWA_SYSTEMBACKDROP_TYPE (flutter#187848) This pull request makes multi-window functional on Windows 10 and removes an unnecessary call during window setup. ## What's new? - Removes call to `EnableTransparentWindowBackground` on `HostWindow` create. In fact, this does not work at all 🎉 Transparency on popups was not implemented with the current implementation. We should do something more complex to make it work, but it has clearly been broken for a while now fixes flutter#186522 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [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.
|
Beta cherry pick PR: #188186 |
…hing important and because Windows 10 does not support DWMWA_SYSTEMBACKDROP_TYPE (#187848) (#188186) This is for fixing a flaky test so no changlog entries needed. Hopefully this resolves #188182 I doubt we can use the auto-CP bot because the initial beta has not been released. Original PR: #187848 <!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> *Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.* *List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.* *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* 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](https://developers.google.com/gemini-code-assist/docs/review-github-code). 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.
…tant and because Windows 10 does not support DWMWA_SYSTEMBACKDROP_TYPE (flutter#187848) This pull request makes multi-window functional on Windows 10 and removes an unnecessary call during window setup. ## What's new? - Removes call to `EnableTransparentWindowBackground` on `HostWindow` create. In fact, this does not work at all 🎉 Transparency on popups was not implemented with the current implementation. We should do something more complex to make it work, but it has clearly been broken for a while now fixes flutter#186522 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [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.

This pull request makes multi-window functional on Windows 10 and removes an unnecessary call during window setup.
What's new?
EnableTransparentWindowBackgroundonHostWindowcreate. In fact, this does not work at all 🎉 Transparency on popups was not implemented with the current implementation. We should do something more complex to make it work, but it has clearly been broken for a while nowfixes #186522
Pre-launch Checklist
///).