From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ypb16-0004dx-St for qemu-devel@nongnu.org; Tue, 05 May 2015 07:28:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ypb13-00054B-NW for qemu-devel@nongnu.org; Tue, 05 May 2015 07:28:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42437) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ypb13-00053K-GK for qemu-devel@nongnu.org; Tue, 05 May 2015 07:27:57 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t45BRuiQ012085 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 5 May 2015 07:27:57 -0400 From: Gerd Hoffmann Date: Tue, 5 May 2015 13:27:46 +0200 Message-Id: <1430825266-30300-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1430825266-30300-1-git-send-email-kraxel@redhat.com> References: <1430825266-30300-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 5/5] gtk: update mouse position in mouse_set() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Without that the next mouse motion event uses the old position as base for relative move calculation, giving wrong results and making your mouse pointer jump around. Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index 8b1458f..c58028f 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -463,6 +463,8 @@ static void gd_mouse_set(DisplayChangeListener *dcl, gdk_device_warp(gdk_device_manager_get_client_pointer(mgr), gtk_widget_get_screen(vc->gfx.drawing_area), x_root, y_root); + vc->s->last_x = x; + vc->s->last_y = y; } #else static void gd_mouse_set(DisplayChangeListener *dcl, -- 1.8.3.1