[PATCH v10 2/9] server: Move mouse raw-input message faking from user32 to wineserver.
Zebediah Figura
zfigura at codeweavers.com
Mon Aug 5 13:19:10 CDT 2019
On 8/5/19 12:22 PM, Derek Lesho wrote:
> What we do now is send a win32-defined INPUT structure to
> __wine_send_input and send_hardware_message. If we want to send raw
> data alongside it we'll have probably need to send in a RAWINPUT
> structure as well as an INPUT structure to these functions. Most
> invocations of __wine_send_input and send_hardware_message aren't
> sending raw-input data at all, but since C doesn't have optional
> parameters we'd have to refactor all invocations of it.
This doesn't seem particularly hard. You could even have winemac and
wineandroid pass NULL, and have user32 fall back to copying from the
INPUT structure in that case.
For that matter, if the only thing that actually matters is the cursor
position, you don't even have to pass in a whole RAWINPUT structure, but
instead just extra x/y parameters, or a POINT structure.
As yet another alternative, we could just pass in a hw_input_t. If it
were my code that's probably what I'd do.
> This also doesn't solve your primary concern, which is the static
> variable to indicate whether we want to emulate raw-input mouse
> movement. Yes we could duplicate the raw-input emulation code into
> all the display drivers for the mouse now and the keyboard in the
> future, but the current solution completely avoids this, and allows
> display drivers that have raw-input capabilities to seamlessly send
> what they want.
>
By the "emulate_raw_mouse" variable I metonymically mean all the logic
introduced by this patch series, but essentially, yes. I disagree here
with this concern: I don't think deduplication should always be the
primary goal, and in this case I think it makes the logic more
complicated than it needs to be.
Besides, if ultimately the goal is to send raw input from all USER
drivers (and I see no reason why this should not be the case), then
there's barely any point trying to make "emulation" simpler.
(By the way, it'd be appreciated if you could bottom-post in replies.)
More information about the wine-devel
mailing list