-
Notifications
You must be signed in to change notification settings - Fork 567
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
Provide additional modifiers as part of the mouse wheel event #895
Conversation
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.
Generally looks good. A few inline comments.
1df9673
to
a72a629
Compare
Thanks for the review @xStrom! I implemented all the changes you requested in the windows shell, let me know if I understood correctly the changes with LOWORD extracting. |
Yeah the let system_delta = HIWORD(wparam as u32) as i16 as f64;
let down_state = LOWORD(wparam as u32) as usize; Then the subsequent use can just be on |
e4f9266
to
4db45bd
Compare
I think this is reasonable. The only alternative I can think of is to have some general mechanism that exposes the mouse position, and plumb that through |
d18891b
to
076c1cd
Compare
076c1cd
to
5dc16b1
Compare
@cmyr getting the mouse position through |
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.
Looks good, thanks!
As part of the prototype I'm working on I wanted to be able to access the current mouse position as part of mouse wheel events, in order to implement zoom to mouse cursor. Since we already supply shared modifiers between other mouse events, and from following the discussion in #843, it seemed somewhat reasonable to do this by changing
WinHandler::wheel
to take aMouseEvent
like the other mouse events, and addingwheel_delta
toMouseEvent
.I've implemented the changes I am suggesting above as a draft on the windows and GTK backends, but work on the other backends is remaining.