@h0tc0d3 I think this is not the correct approach for raw input.
First you need to take the wine-staging patches from user32-rawinput-mouse that add wineserver support for RAWINPUT mouse message: - [0001-server-Add-support-for-absolute-rawinput-mouse-messa.patch](https://gitlab.winehq.org/wine/wine-staging/-/blob/12bbb07ced41f421b47d0d7be...) - [0004-server-Add-send_hardware_message-flags-for-rawinput-.patch](https://gitlab.winehq.org/wine/wine-staging/-/blob/12bbb07ced41f421b47d0d7be...)
Then you need to inject the normal mouse input motion with NtUserSendHardwareInput with flag `SEND_HWMSG_NO_RAW`. That will prevent wineserver from synthesizing rawinput from regular accelerated input.
Finally you need to inject the unaccelerated values with NtUserSendHardwareInput with flag `SEND_HWMSG_NO_MSG`. It will take the x/y values given and apply it directly to the rawinput input msg sent to the windows app.
Some care might be needed with respect to non-motion raw events (like button presses). You might want to let wine synthesize raw button press, I'm not really sure what is best.
I did a similar patch for x11drv -- https://github.com/EBADBEEF/wine/commit/106840af0eb1d13e790c4fcbf6b08ca6d6c5... . Take a look at [X11DRV_RawMotion()](https://github.com/EBADBEEF/wine/blob/proton_9_0-1-rawinput1/dlls/winex11.dr...) there to see how I injected *just* the raw input and not regular input. Also [send_mouse_input](https://github.com/EBADBEEF/wine/blob/proton_9_0-1-rawinput1/dlls/winex11.dr...). I'm forgetting some of the details of the implementation (wish I had left myself more comments!). Anyway, hopefully you get the idea.
Proton is still using the old-style wine-staging server patches (that adds SEND_HWMSG_RAWINPUT flag), and needs to be refreshed for wine 9.0. I also re-wrote the xinput2 handling to be much simpler, which might be too ambitious to be accepted in wine as-is. BUT I have been using it to play FPS games for the last 6 months or so on proton and it is really nice to have actual raw input working. I think this is a really important feature for wine!
My quick method for testing raw input was: - Use MouseTester exe from https://github.com/microe1/MouseTester/releases - Using sway on wayland, set desktop mouse sensitivity really really slow `swaymsg -- input "*" accel_profile "flat" ; input "*" pointer_accel '-1.0'` - Make sure that raw input is not really really slow like my desktop mouse ;-) - Add rawinput trace prints ;-) - Also note that for XWayland input events only come if window is focused
I'm about to go on vacation for two weeks but I'm going to try to refresh my changes against the new wine when I get back. If you haven't given it a shot with the wayland driver, I will! I like the idea of a registry key to make this easier to merge in. Hopefully this brain dump was useful to someone.