-
Notifications
You must be signed in to change notification settings - Fork 891
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 the cursor icon when the cursor first enters a window #1807
[Windows] Set the cursor icon when the cursor first enters a window #1807
Conversation
4a900da
to
0d7584e
Compare
It turns out that the first attempt at a fix made it so the "resize" cursor icons never appeared when hovering the cursor over the window borders. |
0d7584e
to
2a0c869
Compare
It turns out that I'm mildly concerned about ordering guarantees here (if any such thing exists for this case), since users may want to set a cursor and have it applied immediately when the cursor enters the window. It may actually be fine in practice, but I don't know for sure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
.cursor_flags() | ||
.contains(CursorFlags::IN_WINDOW) | ||
{ | ||
if (lparam & 0xFFFF) == winuser::HTCLIENT { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(lparam & 0xFFFF)
-> LOWORD(lparam)
Also, wrapping the condition into a separate let statement and/or short command regarding hit-testing here would be great
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
command
I assume you meant to write "comment" here.
2a0c869
to
7f593f2
Compare
Never mind that push. I trusted rust-analyzer a bit too much while I simultaneously did something rust-analyzer didn't support. |
e496138
to
f88ab68
Compare
f88ab68
to
cef0e01
Compare
cargo fmt
has been run on this branchcargo doc
builds successfullyCHANGELOG.md
if knowledge of this change could be valuable to usersI'm not sure if this is the best way to address #1682 since I'm not familiar with how Windows handles cursors WRT windows, and I plan on looking further into this before converting from a draft PR to a normal PR.
Fixes #1682