From patchwork Fri Dec 15 00:28:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 10113427 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 68BC66019C for ; Fri, 15 Dec 2017 00:29:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59FBB28D64 for ; Fri, 15 Dec 2017 00:29:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4EC8329164; Fri, 15 Dec 2017 00:29:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BEACE28D64 for ; Fri, 15 Dec 2017 00:29:34 +0000 (UTC) Received: from localhost ([::1]:43541 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePdsb-0003w6-R2 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 14 Dec 2017 19:29:33 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePdrG-0002q7-Fa for qemu-devel@nongnu.org; Thu, 14 Dec 2017 19:28:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePdrD-00065L-UY for qemu-devel@nongnu.org; Thu, 14 Dec 2017 19:28:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:60590) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ePdrD-00064G-P0 for qemu-devel@nongnu.org; Thu, 14 Dec 2017 19:28:07 -0500 Received: from localhost.localdomain (104-6-24-213.lightspeed.sntcca.sbcglobal.net [104.6.24.213]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AA71621927; Fri, 15 Dec 2017 00:28:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA71621927 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=sstabellini@kernel.org From: Stefano Stabellini To: peter.maydell@linaro.org, stefanha@gmail.com Date: Thu, 14 Dec 2017 16:28:02 -0800 Message-Id: <1513297683-14295-5-git-send-email-sstabellini@kernel.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1513297683-14295-1-git-send-email-sstabellini@kernel.org> References: <1513297683-14295-1-git-send-email-sstabellini@kernel.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 198.145.29.99 Subject: [Qemu-devel] [PULL 5/6] 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: sstabellini@kernel.org, Owen Smith , qemu-devel@nongnu.org, stefanha@redhat.com, anthony.perard@citrix.com, xen-devel@lists.xenproject.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Owen Smith 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 Reviewed-by: Gerd Hoffmann Reviewed-by: Stefano Stabellini Signed-off-by: Stefano Stabellini --- hw/display/xenfb.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c index 776a2ce..d4fc0fa 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)