Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Set cursor immediately when framework requests update #49784

Merged
merged 2 commits into from
Jan 25, 2024

Conversation

hasali19
Copy link
Contributor

@hasali19 hasali19 commented Jan 14, 2024

On Windows, when using a MouseRegion widget to change the cursor it is not actually updated until the cursor is moved. This is because the Windows embedder only updates the current_cursor_ field but does not actually set the cursor until the window receives the WM_SETCURSOR message when the mouse moves. This change makes it set the cursor immediately.

Fixes flutter/flutter#76622

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

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.

@hasali19 hasali19 changed the title Set cursor immediately when framework requests update [Windows] Set cursor immediately when framework requests update Jan 14, 2024
Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me but you'll need to add a test.

@yaakovschectman
Copy link
Contributor

Agreed on both counts.

Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

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

Thanks for adding the test and for fixing the bug! Looks great!

LGTM stamp from a Japanese personal seal

@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 25, 2024
Copy link
Contributor

auto-submit bot commented Jan 25, 2024

auto label is removed for flutter/engine/49784, due to This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.

  • Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a flutter-hacker before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 25, 2024
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.

LGTM, thanks for fixing this!

@loic-sharma loic-sharma added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 25, 2024
@auto-submit auto-submit bot merged commit a759e94 into flutter:main Jan 25, 2024
28 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 25, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jan 25, 2024
…142202)

flutter/engine@4880592...499ed00

2024-01-25 skia-flutter-autoroll@skia.org Roll Skia from 3b7accdf8ed8 to 571873c31056 (1 revision) (flutter/engine#50026)
2024-01-25 jonahwilliams@google.com [Impeller] round up subpass coverage when it is close to (and smaller) than root pass size. (flutter/engine#49925)
2024-01-25 mzhou620@gmail.com Adding DDC module system targets to web SDK artifacts. (flutter/engine#47783)
2024-01-25 hasan@hasali.dev [Windows] Set cursor immediately when framework requests update (flutter/engine#49784)
2024-01-25 737941+loic-sharma@users.noreply.github.com [Windows] Introduce `egl::Surface` and `egl::WindowSurface` (flutter/engine#49983)
2024-01-25 skia-flutter-autoroll@skia.org Roll Skia from 588caf1ceddd to 3b7accdf8ed8 (1 revision) (flutter/engine#50025)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: 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
@hasali19 hasali19 deleted the fix-windows-cursor-update branch January 25, 2024 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: desktop autosubmit Merge PR when tree becomes green via auto submit App platform-windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MouseRegion does not update until mouse is moved
4 participants