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

fix cursor blinking when clicking decorations bar on Windows #1852

Merged
merged 2 commits into from
Feb 6, 2021

Conversation

Ssaely
Copy link
Contributor

@Ssaely Ssaely commented Feb 5, 2021

On Windows when clicking on the decorations bar the mouse cursor would briefly blink. This PR fixes this by passing in the LPARAM received in the WM_NCLBUTTONDOWN when posting the message

  • Tested on all platforms changed
  • Compilation warnings were addressed
  • cargo fmt has been run on this branch
  • cargo doc builds successfully
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality
  • Updated feature matrix, if new features were added or implemented

@maroider
Copy link
Member

maroider commented Feb 5, 2021

The issue this fixes is something that's been bothering me a bit, but not enough for me to investigate it myself.

I'll admit that I don't quite understand why there's a PostMessage call there in the first place, but I can't really be bothered to chase it through git blame either.

So, thanks for saving me the work :D

@Ssaely
Copy link
Contributor Author

Ssaely commented Feb 6, 2021

I'll admit that I don't quite understand why there's a PostMessage call there in the first place

I honestly wasn't sure why that was there either and thought about completely removing that, but after some digging I found this, which was the PR where a custom handler for WM_NCLBUTTONDOWN was originally created.

@msiglreith msiglreith merged commit b1be34c into rust-windowing:master Feb 6, 2021
aloucks added a commit to aloucks/winit that referenced this pull request Feb 23, 2025
When clicking the title bar on Windows, to drag the window, there is
a noticible pause in continuous redraw requests. This was fixed
in rust-windowing#839 and then regressed in rust-windowing#1852. The cursor blinks in both
cases and is unrelated. The regression made the blink happen after
the pause instead of immediately.
aloucks added a commit to aloucks/winit that referenced this pull request Feb 23, 2025
When clicking the title bar on Windows, to drag the window, there is
a noticible pause in continuous redraw requests. This was fixed
in rust-windowing#839 and then regressed in rust-windowing#1852. The cursor blinks in both
cases and is unrelated. The regression made the blink happen after
the pause instead of immediately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants