From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yqgm6-0005ML-1Z for qemu-devel@nongnu.org; Fri, 08 May 2015 07:49:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yqgm4-0000kU-QB for qemu-devel@nongnu.org; Fri, 08 May 2015 07:49:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yqgm4-0000kM-Lm for qemu-devel@nongnu.org; Fri, 08 May 2015 07:49:00 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 4A1E8B813C for ; Fri, 8 May 2015 11:49:00 +0000 (UTC) From: Gerd Hoffmann Date: Fri, 8 May 2015 13:48:51 +0200 Message-Id: <1431085731-6362-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1431085731-6362-1-git-send-email-kraxel@redhat.com> References: <1431085731-6362-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 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