Skip to content

Conversation

@mattkae
Copy link
Contributor

@mattkae mattkae commented Aug 7, 2025

What's new?

This pull request implements the remaining bits necessary for landing regular windows on win32 for the engine only.

  • Updated InternalFlutterWindows_WindowManager_CreateRegularWindow
    • Separated constraints and size to two different fields
    • Added title
  • Updated InternalFlutterWindows_WindowManager_SetWindowSize
  • Added InternalFlutterWindows_WindowManager_SetWindowConstraints
  • Added InternalFlutterWindows_WindowManager_SetFullscreen
  • Added InternalFlutterWindows_WindowManager_GetFullscreen
  • Added integration tests, but let me know if you think more tests would help! I felt that the integration tests showed off the functionality very well.

canonical#64 will follow with the framework side of things 🚀

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • 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 documentation (doc comments with ///).
  • 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.

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 engine flutter/engine related. See also e: labels. platform-windows Building on or for Windows specifically a: desktop Running on desktop labels Aug 7, 2025
Copy link
Contributor

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

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 significant functionality for managing windows on Win32, including window creation, sizing, constraints, and fullscreen mode. A new DisplayManager is added to handle display-related events. The changes are well-structured, with new data structures like WindowSizeRequest and WindowConstraints improving clarity over the previous WindowSizing struct. The implementation of fullscreen mode, adapted from Chromium, is robust and handles various edge cases like DPI and monitor changes.

I've identified a few areas for improvement, mainly related to code consistency, style guide adherence, and correctness in both implementation and tests. These include using nullptr over NULL, ensuring const-correctness, using appropriate enum values for API calls, and fixing a minor issue in a unit test. I've also pointed out an unnecessary header include that should be removed.

Once these points are addressed, the PR will be in great shape.

The review was conducted with the Google C++ Style Guide in mind, as specified in the repository's contribution guidelines. The following aspects of the style guide were referenced in the review comments:

  • const Correctness: Functions that do not modify member state should be declared const.
  • nullptr vs NULL: nullptr is preferred over NULL in C++11 and later.
  • Header Include Style: System headers should be included with <> and project headers with "".
  • Inline Functions: Small functions defined in headers should be inline to prevent ODR violations.

@mattkae mattkae force-pushed the regular_windows_win32_engine branch from 20ee9c9 to b690b5c Compare August 7, 2025 18:28
@mattkae mattkae marked this pull request as ready for review August 7, 2025 18:41
@mattkae mattkae requested a review from loic-sharma August 12, 2025 12:16
Copy link
Member

@loic-sharma loic-sharma left a comment

Choose a reason for hiding this comment

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

Looks good, with some nits :)

My knowledge of win32 APIs is weak. I only did a superficial review there, but the changes seem reasonable. Excellent tests!

@mattkae mattkae enabled auto-merge August 13, 2025 13:21
@mattkae mattkae added this pull request to the merge queue Aug 13, 2025
Merged via the queue into flutter:master with commit 738ec1a Aug 13, 2025
180 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 13, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Aug 13, 2025
Roll Flutter from e2a347b14a18 to 34c2a3b158b2 (41 revisions)

flutter/flutter@e2a347b...34c2a3b

2025-08-13 bkonyi@google.com [ Tool ] Mark Linux_pixel_7pro linux_chrome_dev_mode as bringup (flutter/flutter#173646)
2025-08-13 bkonyi@google.com [ Widget Preview ] Move `--dtd-url` from a global flag to a `widget-preview start` option (flutter/flutter#173712)
2025-08-13 jssaadeh@outlook.com Null aware elements clean-ups (flutter/flutter#173074)
2025-08-13 engine-flutter-autoroll@skia.org Roll Skia from 29e3e1ab7f62 to f7fdda3cd0e6 (3 revisions) (flutter/flutter#173709)
2025-08-13 matt.kosarek@canonical.com Regular windows win32 engine (flutter/flutter#173424)
2025-08-13 engine-flutter-autoroll@skia.org Roll Dart SDK from a098cb676fd6 to 73153bdc1459 (1 revision) (flutter/flutter#173708)
2025-08-13 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from vgv-rTf7i9PfcDq2Y... to I1TfNmsqTp7t3rO8e... (flutter/flutter#173690)
2025-08-13 engine-flutter-autoroll@skia.org Roll Skia from 1170405c30cf to 29e3e1ab7f62 (2 revisions) (flutter/flutter#173689)
2025-08-13 engine-flutter-autoroll@skia.org Roll Dart SDK from e2b7aec7333e to a098cb676fd6 (4 revisions) (flutter/flutter#173683)
2025-08-13 engine-flutter-autoroll@skia.org Roll Skia from d06fdf03c6a1 to 1170405c30cf (4 revisions) (flutter/flutter#173681)
2025-08-13 engine-flutter-autoroll@skia.org Roll Skia from 9ed4b4e53db2 to d06fdf03c6a1 (11 revisions) (flutter/flutter#173661)
2025-08-12 robert.ancell@canonical.com Fix GTK redraw call being called from non-GTK thread. (flutter/flutter#173602)
2025-08-12 jason-simmons@users.noreply.github.com [Impeller] Apply Y coordinate scaling when sampling from the destination texture in framebuffer advanced blends (flutter/flutter#173639)
2025-08-12 11901536+romaingyh@users.noreply.github.com Fix directional focus in nested scrollables with different axis (flutter/flutter#172875)
2025-08-12 41930132+hellohuanlin@users.noreply.github.com [ios][tools]do not log "bonjour not found" at all (unless verbose) (flutter/flutter#173569)
2025-08-12 1063596+reidbaker@users.noreply.github.com Remove jetifier usages  (flutter/flutter#173548)
2025-08-12 bkonyi@google.com [ Tool ] Fix run_linux_chrome_dev_mode (flutter/flutter#173647)
2025-08-12 41930132+hellohuanlin@users.noreply.github.com [ios] Update iOS code signing CIPD instruction command (flutter/flutter#171173)
2025-08-12 bkonyi@google.com Reapply "Make device debuggable if useDwdsWebSocketConnection is true … (#173551)" (flutter/flutter#173628)
2025-08-12 jason-simmons@users.noreply.github.com Roll Clang to 8c7a2ce01a77c96028fe2c8566f65c45ad9408d3 (flutter/flutter#173429)
2025-08-12 mdebbar@google.com [web] Fallback to CanvasKit when WebGL is not available (flutter/flutter#173629)
2025-08-12 engine-flutter-autoroll@skia.org Roll Packages from a114ac2 to 08a9b2c (3 revisions) (flutter/flutter#173625)
2025-08-12 bkonyi@google.com [ Tool ] Fix crash from possible DDS startup race (flutter/flutter#173362)
2025-08-12 engine-flutter-autoroll@skia.org Roll Skia from a2936eff2179 to 9ed4b4e53db2 (3 revisions) (flutter/flutter#173611)
2025-08-12 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 4 to 5 in the all-github-actions group (flutter/flutter#173606)
2025-08-12 engine-flutter-autoroll@skia.org Roll Dart SDK from c5fe48aee60d to e2b7aec7333e (1 revision) (flutter/flutter#173604)
2025-08-12 engine-flutter-autoroll@skia.org Roll Skia from 44bb9d908ee4 to a2936eff2179 (21 revisions) (flutter/flutter#173603)
2025-08-12 ybz975218925@gmail.com Fix the issue of over-scrolling in SliverMainAxisGroup with a PinnedHeaderSliver. (flutter/flutter#173349)
2025-08-12 engine-flutter-autoroll@skia.org Roll Dart SDK from b2a23936f968 to c5fe48aee60d (2 revisions) (flutter/flutter#173596)
2025-08-11 fmalita@gmail.com Update CanRenderTiledTexture unit tests (flutter/flutter#173553)
2025-08-11 15619084+vashworth@users.noreply.github.com Update integration test for iOS deployment workflows (flutter/flutter#173566)
2025-08-11 30870216+gaaclarke@users.noreply.github.com Enables vulkan for PowerVR B-Series (flutter/flutter#173561)
2025-08-11 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reapply "Make device debuggable if useDwdsWebSocketConnection is true … (#173551)" (#173568)" (flutter/flutter#173587)
2025-08-11 engine-flutter-autoroll@skia.org Roll Dart SDK from 8e882349fcab to b2a23936f968 (2 revisions) (flutter/flutter#173571)
2025-08-11 bkonyi@google.com Reapply "Make device debuggable if useDwdsWebSocketConnection is true … (#173551)" (flutter/flutter#173568)
2025-08-11 15619084+vashworth@users.noreply.github.com Update CI iOS tests (flutter/flutter#173563)
2025-08-11 engine-flutter-autoroll@skia.org Roll Packages from 34948d1 to a114ac2 (4 revisions) (flutter/flutter#173556)
2025-08-11 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from HclTm0V8hgSpfqmtG... to vgv-rTf7i9PfcDq2Y... (flutter/flutter#173505)
2025-08-11 engine-flutter-autoroll@skia.org Roll Dart SDK from 6a7ae1ffd1c9 to 8e882349fcab (2 revisions) (flutter/flutter#173499)
2025-08-11 32538273+ValentinVignal@users.noreply.github.com Update `ExpansibleController` in `ExpansionTile` `didUpdateWidget` (flutter/flutter#173175)
2025-08-11 41930132+hellohuanlin@users.noreply.github.com add format cmd to tools instruction (flutter/flutter#173428)

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
...
SydneyBao pushed a commit to SydneyBao/flutter that referenced this pull request Aug 14, 2025
## What's new?
This pull request implements the remaining bits necessary for landing
regular windows on win32 for the engine only.

- Updated `InternalFlutterWindows_WindowManager_CreateRegularWindow`
  - Separated constraints and size to two different fields
  - Added title
- Updated `InternalFlutterWindows_WindowManager_SetWindowSize`
- Added `InternalFlutterWindows_WindowManager_SetWindowConstraints`
- Added `InternalFlutterWindows_WindowManager_SetFullscreen`
- Added `InternalFlutterWindows_WindowManager_GetFullscreen`
- Added integration tests, but let me know if you think more tests would
help! I felt that the integration tests showed off the functionality
very well.

canonical#64 will follow with the
framework side of things 🚀

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [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.

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](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.
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
## What's new?
This pull request implements the remaining bits necessary for landing
regular windows on win32 for the engine only.

- Updated `InternalFlutterWindows_WindowManager_CreateRegularWindow`
  - Separated constraints and size to two different fields
  - Added title
- Updated `InternalFlutterWindows_WindowManager_SetWindowSize`
- Added `InternalFlutterWindows_WindowManager_SetWindowConstraints`
- Added `InternalFlutterWindows_WindowManager_SetFullscreen`
- Added `InternalFlutterWindows_WindowManager_GetFullscreen`
- Added integration tests, but let me know if you think more tests would
help! I felt that the integration tests showed off the functionality
very well.

canonical#64 will follow with the
framework side of things 🚀

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [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.

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](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.
mboetger pushed a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
## What's new?
This pull request implements the remaining bits necessary for landing
regular windows on win32 for the engine only.

- Updated `InternalFlutterWindows_WindowManager_CreateRegularWindow`
  - Separated constraints and size to two different fields
  - Added title
- Updated `InternalFlutterWindows_WindowManager_SetWindowSize`
- Added `InternalFlutterWindows_WindowManager_SetWindowConstraints`
- Added `InternalFlutterWindows_WindowManager_SetFullscreen`
- Added `InternalFlutterWindows_WindowManager_GetFullscreen`
- Added integration tests, but let me know if you think more tests would
help! I felt that the integration tests showed off the functionality
very well.

canonical#64 will follow with the
framework side of things 🚀

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [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.

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](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.
korca0220 pushed a commit to korca0220/flutter that referenced this pull request Sep 22, 2025
## What's new?
This pull request implements the remaining bits necessary for landing
regular windows on win32 for the engine only.

- Updated `InternalFlutterWindows_WindowManager_CreateRegularWindow`
  - Separated constraints and size to two different fields
  - Added title
- Updated `InternalFlutterWindows_WindowManager_SetWindowSize`
- Added `InternalFlutterWindows_WindowManager_SetWindowConstraints`
- Added `InternalFlutterWindows_WindowManager_SetFullscreen`
- Added `InternalFlutterWindows_WindowManager_GetFullscreen`
- Added integration tests, but let me know if you think more tests would
help! I felt that the integration tests showed off the functionality
very well.

canonical#64 will follow with the
framework side of things 🚀

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [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.

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](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.
bufffun pushed a commit to bufffun/flutter that referenced this pull request Oct 3, 2025
## What's new?
This pull request implements the remaining bits necessary for landing
regular windows on win32 for the engine only.

- Updated `InternalFlutterWindows_WindowManager_CreateRegularWindow`
  - Separated constraints and size to two different fields
  - Added title
- Updated `InternalFlutterWindows_WindowManager_SetWindowSize`
- Added `InternalFlutterWindows_WindowManager_SetWindowConstraints`
- Added `InternalFlutterWindows_WindowManager_SetFullscreen`
- Added `InternalFlutterWindows_WindowManager_GetFullscreen`
- Added integration tests, but let me know if you think more tests would
help! I felt that the integration tests showed off the functionality
very well.

canonical#64 will follow with the
framework side of things 🚀

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [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.

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](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.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 12, 2025
lucaantonelli pushed a commit to lucaantonelli/flutter that referenced this pull request Nov 21, 2025
## What's new?
This pull request implements the remaining bits necessary for landing
regular windows on win32 for the engine only.

- Updated `InternalFlutterWindows_WindowManager_CreateRegularWindow`
  - Separated constraints and size to two different fields
  - Added title
- Updated `InternalFlutterWindows_WindowManager_SetWindowSize`
- Added `InternalFlutterWindows_WindowManager_SetWindowConstraints`
- Added `InternalFlutterWindows_WindowManager_SetFullscreen`
- Added `InternalFlutterWindows_WindowManager_GetFullscreen`
- Added integration tests, but let me know if you think more tests would
help! I felt that the integration tests showed off the functionality
very well.

canonical#64 will follow with the
framework side of things 🚀

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [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.

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](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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop engine flutter/engine related. See also e: labels. platform-windows Building on or for Windows specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants