qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 7/9] spice: add mouse


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 7/9] spice: add mouse
Date: Fri, 20 Aug 2010 09:37:24 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Lightning/1.0b1 Thunderbird/3.0.6

On 08/20/2010 09:03 AM, Gerd Hoffmann wrote:
  Hi,

Again this is libspice interface (and I think also wire protocol), so
I can't change it. I can convert dz into some button_mask bits before
calling kbd_mouse_event, but looking at the vnc code it seems qemu
expects the mouse wheel events being passed via dz not button_state.

That's unfortunate but understood. Is Spice considered a stable API/wire
protocol at this point?

Yes. There are version numbers though, so we can add new messages and use them in case both server and client are new enough. Unfortunaly this makes the keyboard f*ckup only slightly less messy as we'll have to support both old+new way for compatibility reasons. Oh well.

One of the things to consider is that we only emulate a 2-axis 5 button mouse. Buttons one through three are bits in button_state and buttons 4/5 are represented through dz. My mouse IRL is actually a 9 button mouse.

We encode buttons 4/5 as a -1, 0, 1 in dz which corresponds to 10, 00, and 11. We cannot represent 11 with dz which corresponds to having buttons 4 and 5 pressed simultaneously. Most mice have a scroll wheel for 4/5 but there's no strict requirement that that's the case.

So in terms of building a long term stable wire protocol, you'd be much better off using button_mask to encode buttons 4/5 because it's just a matter of time before we drop the dz hack in qemu.

Regards,

Anthony Liguori

cheers,
  Gerd





reply via email to

[Prev in Thread] Current Thread [Next in Thread]