From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wyw6Q-0005JN-Ob for qemu-devel@nongnu.org; Mon, 23 Jun 2014 00:43:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wyw6M-0001N5-Ay for qemu-devel@nongnu.org; Mon, 23 Jun 2014 00:43:34 -0400 Received: from gate.crashing.org ([63.228.1.57]:55859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wyw6M-0001Mw-1H for qemu-devel@nongnu.org; Mon, 23 Jun 2014 00:43:30 -0400 Message-ID: <1403498597.4587.124.camel@pasglop> From: Benjamin Herrenschmidt Date: Mon, 23 Jun 2014 14:43:17 +1000 In-Reply-To: <1402773581-136888-1-git-send-email-christian@krikkel.de> References: <1402773581-136888-1-git-send-email-christian@krikkel.de> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] input: fix jumpy mouse cursor with USB mouse emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Burger Cc: qemu-devel@nongnu.org, kraxel@redhat.com On Sat, 2014-06-14 at 20:19 +0100, Christian Burger wrote: > Guest mouse pointer was jumpy, when moving host mouse in the vertical direction (see bug #1327800). Ah, I've just done a deep dive into qemu input code to debug that one as well :-) It's not just "jumpy", it goes the wrong way around too... > Signed-off-by: Christian Burger Tested-by: Benjamin Herrenschmidt > --- > hw/input/hid.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/input/hid.c b/hw/input/hid.c > index 295bdab..c58847e 100644 > --- a/hw/input/hid.c > +++ b/hw/input/hid.c > @@ -124,7 +124,7 @@ static void hid_pointer_event(DeviceState *dev, QemuConsole *src, > if (evt->rel->axis == INPUT_AXIS_X) { > e->xdx += evt->rel->value; > } else if (evt->rel->axis == INPUT_AXIS_Y) { > - e->ydy -= evt->rel->value; > + e->ydy += evt->rel->value; > } > break; > > @@ -191,7 +191,7 @@ static void hid_pointer_sync(DeviceState *dev) > if (hs->kind == HID_MOUSE) { > prev->xdx += curr->xdx; > curr->xdx = 0; > - prev->ydy -= curr->ydy; > + prev->ydy += curr->ydy; > curr->ydy = 0; > } else { > prev->xdx = curr->xdx;