On Tue Jun 18 18:59:48 2024 +0000, Errno Ebadf wrote:
Need to send two NtUserSendHardwareInput() calls.
- First with SEND_HWMSG_NO_RAW with the normal accelerated relative motion.
- Second with SEND_HWMSG_NO_MSG with the unaccelerated relative motion
and a new input struct That way the normal accelerated mouse event still gets through with the accelerated data (WM_MOUSEMOVE) and it matches the desktop pointer which is just like windows. We only want the raw input (WM_INPUT) message to have unaccelerated pointer data, so we need to send that too. Also need both server patches from wine-staging user32-rawinput-mouse:
- [0001-server-Add-support-for-absolute-rawinput-mouse-messa.patch](https://gitlab.winehq.org/wine/wine-staging/-/blob/v9.11/patches/user32-rawi...)
- [0004-server-Add-send_hardware_message-flags-for-rawinput-.patch](https://gitlab.winehq.org/wine/wine-staging/-/blob/v9.11/patches/user32-rawi...)
Unfortunately the 0001 patch will break x11 raw input... maybe we need to change wayland and x11 at the same time ;-) Or you could adjust the 0001 patch to only use the raw `x` and `y` when the `SEND_HWMSG_NO_MSG` is set. That way the x11 driver will still synthesize raw inputs the exact same way it does currently.
@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...