Skip to content

Win32: Prevent mouse leave on WM_SYSKEYUP.#184835

Merged
knopp merged 2 commits into
flutter:masterfrom
knopp:win32_prevent_mouse_leave_on_syskeyup
Apr 10, 2026
Merged

Win32: Prevent mouse leave on WM_SYSKEYUP.#184835
knopp merged 2 commits into
flutter:masterfrom
knopp:win32_prevent_mouse_leave_on_syskeyup

Conversation

@knopp

@knopp knopp commented Apr 9, 2026

Copy link
Copy Markdown
Member

Fixes #184462

Pre-launch Checklist

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

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

@knopp knopp requested a review from a team as a code owner April 9, 2026 18:40
@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 team-windows Owned by the Windows platform team labels Apr 9, 2026
@knopp knopp added CICD Run CI/CD and removed engine flutter/engine related. See also e: labels. platform-windows Building on or for Windows specifically a: desktop Running on desktop team-windows Owned by the Windows platform team labels Apr 9, 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 prevents the default window procedure for WM_SYSKEYUP messages in FlutterWindow to avoid unintended window unfocusing and mouse leave events. Corresponding updates were made to MockWindow to mock the Win32DefWindowProc method, and a test case was added to verify the behavior. I recommend moving the mocked Win32DefWindowProc method into the protected section of MockWindow to maintain proper visibility and follow the Google C++ Style Guide.

Comment thread engine/src/flutter/shell/platform/windows/testing/mock_window.h Outdated
@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 team-windows Owned by the Windows platform team and removed CICD Run CI/CD labels Apr 9, 2026
@mattkae mattkae added the CICD Run CI/CD label Apr 9, 2026
@mattkae mattkae enabled auto-merge April 9, 2026 19:06
@mattkae mattkae added this pull request to the merge queue Apr 9, 2026

@loic-sharma loic-sharma left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Apr 10, 2026
@loic-sharma

Copy link
Copy Markdown
Member

The Google testing failures look like flakes. Rerunning...

@knopp knopp added this pull request to the merge queue Apr 10, 2026
Merged via the queue into flutter:master with commit 6b7a9ab Apr 10, 2026
192 of 193 checks passed
@knopp knopp deleted the win32_prevent_mouse_leave_on_syskeyup branch April 10, 2026 19:39
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 11, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 11, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 11, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 12, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 12, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 12, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 13, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Apr 13, 2026
flutter/flutter@bf18e39...2fa45e0

2026-04-13 sigurdm@google.com Test that the locked version of dependencies of sdk packages equal the lower bound (flutter/flutter#183395)
2026-04-13 engine-flutter-autoroll@skia.org Roll Skia from 8d35796258a2 to 55ddd6bb8be5 (1 revision) (flutter/flutter#184952)
2026-04-12 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from tEm4sdcM6twjxQ0w6... to K_2AkZL3Drs6cGE1q... (flutter/flutter#184930)
2026-04-12 engine-flutter-autoroll@skia.org Roll Dart SDK from 77324e51833a to ef28089d6533 (1 revision) (flutter/flutter#184929)
2026-04-12 engine-flutter-autoroll@skia.org Roll Skia from 6942f5774d65 to 8d35796258a2 (2 revisions) (flutter/flutter#184924)
2026-04-11 engine-flutter-autoroll@skia.org Roll Dart SDK from 8fdbf58b58bd to 77324e51833a (1 revision) (flutter/flutter#184921)
2026-04-11 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from lZcRfPoCLnDttrf9P... to tEm4sdcM6twjxQ0w6... (flutter/flutter#184917)
2026-04-11 engine-flutter-autoroll@skia.org Roll Dart SDK from 7128b5b5142c to 8fdbf58b58bd (1 revision) (flutter/flutter#184906)
2026-04-11 engine-flutter-autoroll@skia.org Roll Skia from 8cbf3db1a0db to 6942f5774d65 (1 revision) (flutter/flutter#184911)
2026-04-11 rmolivares@renzo-olivares.dev `SelectableRegion` can dismiss context menu with keyboard shortcuts (flutter/flutter#184788)
2026-04-11 engine-flutter-autoroll@skia.org Roll Skia from a8128c7adc49 to 8cbf3db1a0db (1 revision) (flutter/flutter#184904)
2026-04-10 engine-flutter-autoroll@skia.org Roll Dart SDK from e715805ddbd3 to 7128b5b5142c (3 revisions) (flutter/flutter#184896)
2026-04-10 engine-flutter-autoroll@skia.org Roll Skia from 7c8b85349a9a to a8128c7adc49 (2 revisions) (flutter/flutter#184899)
2026-04-10 mdebbar@google.com [web] Refactor LazyPath and separate immutable paths from path builders (flutter/flutter#177686)
2026-04-10 engine-flutter-autoroll@skia.org Roll Skia from 25b01e5f4ea0 to 7c8b85349a9a (13 revisions) (flutter/flutter#184887)
2026-04-10 mahimasharma0309@gmail.com Reduce boilerplate in FlutterPlatformViewsTest.mm (flutter/flutter#184555)
2026-04-10 matej.knopp@gmail.com [macOS] Add move timer runloop mode to common modes (flutter/flutter#182295)
2026-04-10 engine-flutter-autoroll@skia.org Roll Packages from 1aa892c to c2e3d1f (5 revisions) (flutter/flutter#184886)
2026-04-10 matej.knopp@gmail.com Win32: Prevent mouse leave on WM_SYSKEYUP. (flutter/flutter#184835)

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
mbcorona pushed a commit to mbcorona/flutter that referenced this pull request Apr 15, 2026
Fixes flutter#184462

## 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.

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

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.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
…r#11497)

flutter/flutter@bf18e39...2fa45e0

2026-04-13 sigurdm@google.com Test that the locked version of dependencies of sdk packages equal the lower bound (flutter/flutter#183395)
2026-04-13 engine-flutter-autoroll@skia.org Roll Skia from 8d35796258a2 to 55ddd6bb8be5 (1 revision) (flutter/flutter#184952)
2026-04-12 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from tEm4sdcM6twjxQ0w6... to K_2AkZL3Drs6cGE1q... (flutter/flutter#184930)
2026-04-12 engine-flutter-autoroll@skia.org Roll Dart SDK from 77324e51833a to ef28089d6533 (1 revision) (flutter/flutter#184929)
2026-04-12 engine-flutter-autoroll@skia.org Roll Skia from 6942f5774d65 to 8d35796258a2 (2 revisions) (flutter/flutter#184924)
2026-04-11 engine-flutter-autoroll@skia.org Roll Dart SDK from 8fdbf58b58bd to 77324e51833a (1 revision) (flutter/flutter#184921)
2026-04-11 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from lZcRfPoCLnDttrf9P... to tEm4sdcM6twjxQ0w6... (flutter/flutter#184917)
2026-04-11 engine-flutter-autoroll@skia.org Roll Dart SDK from 7128b5b5142c to 8fdbf58b58bd (1 revision) (flutter/flutter#184906)
2026-04-11 engine-flutter-autoroll@skia.org Roll Skia from 8cbf3db1a0db to 6942f5774d65 (1 revision) (flutter/flutter#184911)
2026-04-11 rmolivares@renzo-olivares.dev `SelectableRegion` can dismiss context menu with keyboard shortcuts (flutter/flutter#184788)
2026-04-11 engine-flutter-autoroll@skia.org Roll Skia from a8128c7adc49 to 8cbf3db1a0db (1 revision) (flutter/flutter#184904)
2026-04-10 engine-flutter-autoroll@skia.org Roll Dart SDK from e715805ddbd3 to 7128b5b5142c (3 revisions) (flutter/flutter#184896)
2026-04-10 engine-flutter-autoroll@skia.org Roll Skia from 7c8b85349a9a to a8128c7adc49 (2 revisions) (flutter/flutter#184899)
2026-04-10 mdebbar@google.com [web] Refactor LazyPath and separate immutable paths from path builders (flutter/flutter#177686)
2026-04-10 engine-flutter-autoroll@skia.org Roll Skia from 25b01e5f4ea0 to 7c8b85349a9a (13 revisions) (flutter/flutter#184887)
2026-04-10 mahimasharma0309@gmail.com Reduce boilerplate in FlutterPlatformViewsTest.mm (flutter/flutter#184555)
2026-04-10 matej.knopp@gmail.com [macOS] Add move timer runloop mode to common modes (flutter/flutter#182295)
2026-04-10 engine-flutter-autoroll@skia.org Roll Packages from 1aa892c to c2e3d1f (5 revisions) (flutter/flutter#184886)
2026-04-10 matej.knopp@gmail.com Win32: Prevent mouse leave on WM_SYSKEYUP. (flutter/flutter#184835)

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
Istiak-Ahmed78 pushed a commit to Istiak-Ahmed78/packages that referenced this pull request Jun 19, 2026
…r#11497)

flutter/flutter@bf18e39...2fa45e0

2026-04-13 sigurdm@google.com Test that the locked version of dependencies of sdk packages equal the lower bound (flutter/flutter#183395)
2026-04-13 engine-flutter-autoroll@skia.org Roll Skia from 8d35796258a2 to 55ddd6bb8be5 (1 revision) (flutter/flutter#184952)
2026-04-12 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from tEm4sdcM6twjxQ0w6... to K_2AkZL3Drs6cGE1q... (flutter/flutter#184930)
2026-04-12 engine-flutter-autoroll@skia.org Roll Dart SDK from 77324e51833a to ef28089d6533 (1 revision) (flutter/flutter#184929)
2026-04-12 engine-flutter-autoroll@skia.org Roll Skia from 6942f5774d65 to 8d35796258a2 (2 revisions) (flutter/flutter#184924)
2026-04-11 engine-flutter-autoroll@skia.org Roll Dart SDK from 8fdbf58b58bd to 77324e51833a (1 revision) (flutter/flutter#184921)
2026-04-11 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from lZcRfPoCLnDttrf9P... to tEm4sdcM6twjxQ0w6... (flutter/flutter#184917)
2026-04-11 engine-flutter-autoroll@skia.org Roll Dart SDK from 7128b5b5142c to 8fdbf58b58bd (1 revision) (flutter/flutter#184906)
2026-04-11 engine-flutter-autoroll@skia.org Roll Skia from 8cbf3db1a0db to 6942f5774d65 (1 revision) (flutter/flutter#184911)
2026-04-11 rmolivares@renzo-olivares.dev `SelectableRegion` can dismiss context menu with keyboard shortcuts (flutter/flutter#184788)
2026-04-11 engine-flutter-autoroll@skia.org Roll Skia from a8128c7adc49 to 8cbf3db1a0db (1 revision) (flutter/flutter#184904)
2026-04-10 engine-flutter-autoroll@skia.org Roll Dart SDK from e715805ddbd3 to 7128b5b5142c (3 revisions) (flutter/flutter#184896)
2026-04-10 engine-flutter-autoroll@skia.org Roll Skia from 7c8b85349a9a to a8128c7adc49 (2 revisions) (flutter/flutter#184899)
2026-04-10 mdebbar@google.com [web] Refactor LazyPath and separate immutable paths from path builders (flutter/flutter#177686)
2026-04-10 engine-flutter-autoroll@skia.org Roll Skia from 25b01e5f4ea0 to 7c8b85349a9a (13 revisions) (flutter/flutter#184887)
2026-04-10 mahimasharma0309@gmail.com Reduce boilerplate in FlutterPlatformViewsTest.mm (flutter/flutter#184555)
2026-04-10 matej.knopp@gmail.com [macOS] Add move timer runloop mode to common modes (flutter/flutter#182295)
2026-04-10 engine-flutter-autoroll@skia.org Roll Packages from 1aa892c to c2e3d1f (5 revisions) (flutter/flutter#184886)
2026-04-10 matej.knopp@gmail.com Win32: Prevent mouse leave on WM_SYSKEYUP. (flutter/flutter#184835)

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 CICD Run CI/CD engine flutter/engine related. See also e: 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.

[Windows] F10 key breaks MouseRegion hover events

3 participants