From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=34119 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OmRVX-00068O-69 for qemu-devel@nongnu.org; Fri, 20 Aug 2010 09:19:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OmRVV-000068-My for qemu-devel@nongnu.org; Fri, 20 Aug 2010 09:19:43 -0400 Received: from mail-iw0-f173.google.com ([209.85.214.173]:51394) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmRVV-00005u-JQ for qemu-devel@nongnu.org; Fri, 20 Aug 2010 09:19:41 -0400 Received: by iwn8 with SMTP id 8so2358722iwn.4 for ; Fri, 20 Aug 2010 06:19:41 -0700 (PDT) Message-ID: <4C6E80E8.6040202@codemonkey.ws> Date: Fri, 20 Aug 2010 08:19:36 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 7/9] spice: add mouse References: <1282221625-29501-1-git-send-email-kraxel@redhat.com> <1282221625-29501-8-git-send-email-kraxel@redhat.com> <4C6D3EEA.4020201@codemonkey.ws> <4C6E7849.1010906@redhat.com> In-Reply-To: <4C6E7849.1010906@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org On 08/20/2010 07:42 AM, Gerd Hoffmann wrote: > Hi, > >>> +static void mouse_motion(SpiceMouseInstance *sin, int dx, int dy, int >>> dz, >>> + uint32_t buttons_state) >>> +{ >>> + kbd_mouse_event(dx, dy, dz, buttons_state); >> >> dz is an odd interface. We use it to represent additional buttons which >> really makes no sense. If you still can, I'd suggest moving dz into >> buttons_state. > > 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? Regards, Anthony Liguori > >> Previous comment still applies though, you should explicitly convert the >> button_states from QEMU format to Spice format to future proof. > > Ok. > > cheers, > Gerd >