-
Notifications
You must be signed in to change notification settings - Fork 948
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
Report mouse motion before click #1490
Conversation
There are two PRs I'm aware of that should be relatively trivial to get merged, which would fix some issues. Other than those, I don't think it makes sense to wait on anything. - Fix Windows crash: rust-windowing#1459 - Fix macOS mouse reports: rust-windowing#1490 While rust-windowing#1459 seems pretty essential to actually make winit run, rust-windowing#1490 is much less important and can probably be ignored if there aren't any resources to merge it.
There are two PRs I'm aware of that should be relatively trivial to get merged, which would fix some issues. Other than those, I don't think it makes sense to wait on anything. - Fix Windows crash: #1459 - Fix macOS mouse reports: #1490 While #1459 seems pretty essential to actually make winit run, #1490 is much less important and can probably be ignored if there aren't any resources to merge it.
Could we also trigger mouse motion before mouse wheel event? |
This fixes an issue on macOS where a mouse click would be generated, without ever getting a mouse motion to the position before the click. This leads to the application thinking the mouse click occurred at a position other than the actual mouse location. This happens due to mouse motion above the window not automatically giving focus to the window, unless it is actually clicked, making it possible to move the window without motion events. Fixes rust-windowing#942.
79ed4dc
to
bfb2945
Compare
I've added it for pressure change and scroll too, since that makes some sense. |
Test failure on Windows should be unrelated to this macOS PR. |
I merged master into this branch which should solve the CI conflicts and get this ready for a merge. |
I have the same issue thank you for the patch, I was wondering if we could add x and y in the mouseClick event instead of doing magic like saving the last x,y sent by the last Mouse::CursorMoved ? |
@QuentinPerez Do you mean in the external Winit API? |
Yes, like Line 256 in 849b8f5
Line 277 in 849b8f5
I'm using iced and I would like to draw a point when I click on the canvas but for that, I need to store the last position received by CursorMoved to know where I can draw on the MouseInput event. |
@QuentinPerez That discussion is probably best for a meta-issue on the tracker, like this previous issue.. This PR is fixing an internal bug regarding emitting the |
* Report mouse motion before click This fixes an issue on macOS where a mouse click would be generated, without ever getting a mouse motion to the position before the click. This leads to the application thinking the mouse click occurred at a position other than the actual mouse location. This happens due to mouse motion above the window not automatically giving focus to the window, unless it is actually clicked, making it possible to move the window without motion events. Fixes rust-windowing#942. * Add additional mouse motion events Co-authored-by: Ryan Goldstein <ryan@ryanisaacg.com>
This fixes an issue on macOS where a mouse click would be generated,
without ever getting a mouse motion to the position before the click.
This leads to the application thinking the mouse click occurred at a
position other than the actual mouse location.
This happens due to mouse motion above the window not automatically
giving focus to the window, unless it is actually clicked, making it
possible to move the window without motion events.
Fixes #942.