From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1yij-0002R4-9Z for qemu-devel@nongnu.org; Tue, 01 Jul 2014 10:07:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1yid-0003IA-8t for qemu-devel@nongnu.org; Tue, 01 Jul 2014 10:07:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1yid-0003I2-0I for qemu-devel@nongnu.org; Tue, 01 Jul 2014 10:07:35 -0400 From: Gerd Hoffmann Date: Tue, 1 Jul 2014 16:07:23 +0200 Message-Id: <1404223646-7899-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1404223646-7899-1-git-send-email-kraxel@redhat.com> References: <1404223646-7899-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 1/4] input: fix jumpy mouse cursor with USB mouse emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Christian Burger , Gerd Hoffmann From: Christian Burger Guest mouse pointer was jumpy, when moving host mouse in the vertical direction (see bug #1327800). Signed-off-by: Christian Burger Signed-off-by: Gerd Hoffmann --- 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 9656e90..148c003 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; -- 1.8.3.1