On 7/29/19 7:00 PM, Derek Lesho wrote:
I agree that splitting up the patches is a good idea, but is it necessary that we continue supporting XInput 2.0? 2.1 was released in 2011 and I doubt many people running the latest versions of wine are going to be on such an ancient xserver.
I agree but it may be a matter of taste and Alexandre will decide whether he's OK with requiring XInput >= 2.1. I wrote the patch to be backward compatible but it could be simplified if that's OK.
Also, I am not quite sure what you mean by replacing the existing code with the rawinput version.
AFAIU the existing RawMotion event handler was sending INPUT messages to the server for the sole purpose of emulating and sending raw input messages. It is not required anymore so you can replace this "normal" input with your "raw" input code. The "normal" input messages will still be sent when MotionNotify events are processed.
Windows raw-input still operates on ints,
and XI2 only sends rawmotion mouse events in raw_values as whole numbers, even if they're floats. However, when getting the data from valuators.values, there are not whole due from mouse acceleration / scaling. Even if we did send the floats to wineserver, I don't know how we'd transform them ourselves to match what the DE does ourselves.
From what I could see for relative X/Y, XInput2 raw values looks to be integral values in floating point fields, and the values are the same as on Windows: +-1.0 for the smallest increment. Of course it may depend on the hardware / driver; I tested with some generic touchpad and mouse with the same results.
It looks to be slightly different for mouse wheel though, with an 8x factor:
* Using a stepping mouse wheel, I saw +-15.0 for a wheel step in XInput2, corresponding to +-120 on Windows.
* With touchpad finger scrolling, the smallest XInput2 raw value was around 0.488158 but Windows was acting like it was accumulating until value was >= 120 (but that may also be the VM acting in the middle).