On Tue Jun 18 18:59:48 2024 +0000, Grigory Vasilyev wrote:
@EBADF Proton only uses one flag, and my solution is based on proton's code. At least everything works as it should. As I understand it, Wine always generates one of the message types from the other, and there are no separate threads for updating both at once. Therefore, @rbernon suggested the option of using `lparam` in `NtUserSendHardwareInput`. I don't yet fully understand how this all works, and which solution is more correct from proton or wine-staging. https://github.com/ValveSoftware/wine/commit/7ecb696933b019dbb6b124ca1e18f87...
You are right I made some wrong assumptions, sorry! I see your patch is different from the newer wine-staging ones (indeed it is like the old one that is in proton). Ultimately you need to give the server the accelerated data AND the unaccelerated data. From what I see your changes only give it the unaccelerated data which is not right (desktop mouse motion won't be correct because it is unaccelerated). The old send_hardware_message() accepted a RAWINPUT struct that you had to populate when you set the SEND_HWMSG_RAWINPUT flag. I am getting confused (sorry!) -- looks like wine has been refactored quite a bit since then. I can't figure out how you are supposed to get the rawinput data in separately from the regular mouse motion.
In my opinion using the latest wine-staging patches makes it very straightforward to implement as I described in my earlier comment.