[Spice-devel] [3/6] [PATCH spice] Add horizontal mouse wheel support

Matthew J. Francis mjay.francis at gmail.com
Mon Oct 30 14:22:40 UTC 2017


On 30/10/2017 17:28, Frediano Ziglio wrote:
> This patch changes ABI so would need a version bump and a Qemu patch.
> Did you send a patch to Qemu too?

As mentioned in the patch overview, I haven't touched qemu yet - if I
can get agreement on what the API/ABI should look like from the SPICE
end, I will work on that next.

> Maybe some capability and usage of some bits in wheel_motion could do
> instead of we could add an additional function in SpiceTabletInstance/SpiceMouseInterface
> to have a compatible ABI.

I considered three options for this in total, each of which has some
advantages and disadvantages

1) Change the existing API (as in the posted patch)
    + Gives the cleanest code on the SPICE server side
    - ABI incompatible, code that links against it must update in step

2) Add "motion_2()" (SpiceMouseInterface) and "wheel_2()"
    (SpiceTabletInterface)
    + Compatible ABI
    - Having two functions in the interfaces for the same thing is nasty,
      and complicates the server code

3) Redefine the semantics of the existing interfaces such that e.g.
    +1/-1 wheel means vertical, +2/-2 means horizontal
    + Nominally the least invasive option in terms of API/ABI
    - Also feels a bit nasty in terms of API, and the behaviour of
      existing code would have to be considered carefully


If option 1) is not preferred, is 3) worth considering?
If not, I will rework with option 2).


> OT: what about support for touch pads?

What requirements might there be in terms of touch pads?


Regards
Matthew Francis



More information about the Spice-devel mailing list