Add touchpad magnify gesture support for Windows.#2501
Conversation
|
I was thinking that maybe some people have already implemented the magnification gesture in their code by checking if the control key is activated when they receive a MouseWheel event. But with these changes, their code might not work on Windows anymore because MouseWheel will no longer be emitted. And I also follow this #2157 wich is also a note as a break change. |
|
Yeah, I could guess - I was more thinking explaining it in the changelog, so that the user knows "oh, I gotta check for my usage of |
|
Oh yes, I see, so something like that should be more understandable ? |
madsmtm
left a comment
There was a problem hiding this comment.
Yup, that looks wonderful.
Can't say anything about the implementation, @msiglreith will likely do that at some point
|
The implementation looks fine but I'm a bit unsure about doing this inside
|
|
Yes, you're right, after thinking about it a bit, I also think these changes are not very much in line with Winit's goals, my bad. Thanks for your time ! |
After seeing touchpad gestures implemented on macOS ( #2157 ), I looked for an implementation for Windows.
According to the microsfot documentation, there is a WM_GESTURE message that can be processed to support touchpad gestures. But at first I couldn't get one of these messages, then after searching, it seems that no one has implemented this message yet.
Then, in the microsoft doc, I saw this table https://bit.ly/3LDVdRd which describes how the gestures correspond to the existing messages, so based on that and on #2157, I implemented the zoom gesture.
What do you think about it ?
Thanks in advance.