[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. |
| .cursor_flags() | ||
| .contains(CursorFlags::IN_WINDOW) | ||
| { | ||
| if (lparam & 0xFFFF) == winuser::HTCLIENT { |
There was a problem hiding this comment.
(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.
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 fmthas been run on this branchcargo docbuilds successfullyCHANGELOG.mdif 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