From patchwork Fri Nov 3 11:56:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Owen Smith X-Patchwork-Id: 833813 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 3yT0nS5m8Zz9s0Z for ; Fri, 3 Nov 2017 22:57:32 +1100 (AEDT) Received: from localhost ([::1]:36121 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAabK-0005tD-Te for incoming@patchwork.ozlabs.org; Fri, 03 Nov 2017 07:57:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAaaX-0005sF-Uz for qemu-devel@nongnu.org; Fri, 03 Nov 2017 07:56:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eAaaT-0003Wv-La for qemu-devel@nongnu.org; Fri, 03 Nov 2017 07:56:42 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:36064) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1eAaaT-0003VK-GB for qemu-devel@nongnu.org; Fri, 03 Nov 2017 07:56:37 -0400 X-IronPort-AV: E=Sophos;i="5.44,338,1505779200"; d="scan'208";a="457676738" From: Owen Smith To: , , Date: Fri, 3 Nov 2017 11:56:31 +0000 Message-ID: <20171103115631.15175-5-owen.smith@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171103115631.15175-1-owen.smith@citrix.com> References: <20171103115631.15175-1-owen.smith@citrix.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.63 Subject: [Qemu-devel] [PATCH v5 4/4] xenfb: activate input handlers for raw pointer devices X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: xen-devel@lists.xenproject.org, qemu-devel@nongnu.org, owen.smith@citrix.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" If the frontend requests raw pointers, the input handlers must be activated to have the input events delivered to the xenfb backend. Without activation, the input events are delivered to handlers registered earlier, which would be the emulated USB tablet or emulated PS/2 mouse. HVM xen_kbdfront can incorrectly scale absolute coordinates when the display resolution is not 800x600. Signed-off-by: Owen Smith --- hw/display/xenfb.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c index 3cbc248c34..c070c84f5b 100644 --- a/hw/display/xenfb.c +++ b/hw/display/xenfb.c @@ -387,6 +387,11 @@ static void input_connected(struct XenDevice *xendev) in->qkbd = qemu_input_handler_register((DeviceState *)in, &xenfb_keyboard); in->qmou = qemu_input_handler_register((DeviceState *)in, in->abs_pointer_wanted ? &xenfb_abs_mouse : &xenfb_rel_mouse); + + if (in->raw_pointer_wanted) { + qemu_input_handler_activate(in->qkbd); + qemu_input_handler_activate(in->qmou); + } } static void input_disconnect(struct XenDevice *xendev)