From patchwork Thu Mar 13 19:30:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 330083 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 14F672C00C6 for ; Fri, 14 Mar 2014 06:32:59 +1100 (EST) Received: from localhost ([::1]:41251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOBN9-00023l-MD for incoming@patchwork.ozlabs.org; Thu, 13 Mar 2014 15:32:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60891) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOBLG-0007hN-9u for qemu-devel@nongnu.org; Thu, 13 Mar 2014 15:31:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOBL9-0000G5-33 for qemu-devel@nongnu.org; Thu, 13 Mar 2014 15:30:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOBL8-0000Fr-Rl for qemu-devel@nongnu.org; Thu, 13 Mar 2014 15:30:51 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2DJUm1P023336 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 13 Mar 2014 15:30:48 -0400 Received: from colepc.home.com (ovpn-113-49.phx2.redhat.com [10.3.113.49]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s2DJUgaY013829; Thu, 13 Mar 2014 15:30:47 -0400 From: Cole Robinson To: qemu-devel@nongnu.org Date: Thu, 13 Mar 2014 15:30:23 -0400 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Peter Maydell , Gerd Hoffmann , Anthony Liguori , Cole Robinson Subject: [Qemu-devel] [PATCH v2 6/7] gtk: Fix mouse warping with gtk3 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We were using the wrong coordinates, this fixes things to match the original gtk2 implementation. You can see this error in action by using -vga qxl, however even after this patch the mouse warps in small increments up and to the left, -7x and -3y pixels at a time, until the pointer is warped off the widget. I think it's a qxl bug, but the next patch covers it up. Signed-off-by: Cole Robinson --- ui/gtk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index f42952e..8482791 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -346,7 +346,7 @@ static void gd_mouse_set(DisplayChangeListener *dcl, x, y, &x_root, &y_root); gdk_device_warp(gdk_device_manager_get_client_pointer(mgr), gtk_widget_get_screen(s->drawing_area), - x, y); + x_root, y_root); } #else static void gd_mouse_set(DisplayChangeListener *dcl,