[PATCH v9 6/8] winex11.drv: Implement native mouse-movement raw-input using RawMotion.

Derek Lesho dereklesho52 at gmail.com
Tue Jul 30 17:41:44 CDT 2019


> 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 was my impression that MotionNotify events are ignored when the the
cursor is clipped, due to some bug or problem it.  I went searching to
see whether the case, and I found this:
https://github.com/wine-mirror/wine/commit/0e2b4f99a9f5d97f8da0189037b7516cf1585d45#diff-c78b8a343abe990b307f178fe51c8931R332

This commit came around the time they were adding raw-input, and it
seems to indicate that there is a problem w/ MotionNotify on a clipped
cursor, but the ignore case isn't there anymore so maybe things have
changed.  Some other reasons I'm skeptical that the RawMotion code
currently in place is only for rawinput events are that

1) The input is also sent as WM_MOUSEMOVE by the server, as there was
no previous infrastructure to send raw-input separately and

2) When somebody tested warframe with my patch before I re-added
mouse-movements, they had issues that were fixed by rebasing
mouse-movements on my commit, and warframe does not use raw-input for
the mouse.

As for the rest of your email, thank you for doing the testing to
confirm these values.

On Tue, Jul 30, 2019 at 3:42 AM Rémi Bernon <rbernon at codeweavers.com> wrote:
>
> 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).
> --
> Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list