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: 10039909 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 46F54602DA for ; Fri, 3 Nov 2017 11:59:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2CF89295B8 for ; Fri, 3 Nov 2017 11:59:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21DAB295BA; Fri, 3 Nov 2017 11:59:00 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A58F4295B8 for ; Fri, 3 Nov 2017 11:58:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAaaX-0008DM-7L; Fri, 03 Nov 2017 11:56:41 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAaaW-0008Cb-7r for xen-devel@lists.xenproject.org; Fri, 03 Nov 2017 11:56:40 +0000 Received: from [85.158.139.211] by server-2.bemta-5.messagelabs.com id CD/84-23269-7795CF95; Fri, 03 Nov 2017 11:56:39 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprGIsWRWlGSWpSXmKPExsXitHSDvW555J9 IgxPdTBbft0xmcmD0OPzhCksAYxRrZl5SfkUCa0bXd+2CBs6Kz9vnMzYwnmbvYuTkkBDwl3g+ YQoriM0moCExo3MxC4gtIuAncbj5FlgNs0C4xNIbjcwgtjBQ/MrTKWBxFgEViXmrbzOC2LwCV hKv1mxigZgpL7Gr7SLYTE4Ba4ldl4+xgdhCQDW3/j+HspUkvi1+wQzRKyhxcuYTFohdEhIHX7 xgnsDIOwtJahaS1AJGplWMGsWpRWWpRbpGBnpJRZnpGSW5iZk5uoYGpnq5qcXFiempOYlJxXr J+bmbGIGhU8/AwLiDsXG23yFGSQ4mJVFez5A/kUJ8SfkplRmJxRnxRaU5qcWHGGU4OJQkeDmA oSgkWJSanlqRlpkDDGKYtAQHj5IIb2c4UJq3uCAxtzgzHSJ1itGYo+Pm3T9MHM9mvm5gFmLJy 89LlRLnXRMBVCoAUppRmgc3CBZdlxhlpYR5GRkYGIR4ClKLcjNLUOVfMYpzMCoJ83KATOHJzC uB2/cK6BQmoFNmc4CdUpKIkJJqYIz13SHEmVpYGmtauOWXhvL/530iC9Z6RmytfX/wbfDBS11 dd9K5+0+tN+uQXe9crB/Je7blbcreTzMuO/+IePp+avQMweibgQbzF3POCNRqPG6kd+U3U9ci AV25Rgf/u/s/7E5ZsqSocsK++3q9c28+zrvr7rljn2isa9uZG+t8ewp4D89TOKHEUpyRaKjFX FScCABZDXhJqQIAAA== X-Env-Sender: prvs=473f30fe0=owen.smith@citrix.com X-Msg-Ref: server-4.tower-206.messagelabs.com!1509710197!109956197!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 36034 invoked from network); 3 Nov 2017 11:56:38 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-4.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 3 Nov 2017 11:56:38 -0000 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 Cc: xen-devel@lists.xenproject.org, qemu-devel@nongnu.org, owen.smith@citrix.com Subject: [Xen-devel] [PATCH v5 4/4] xenfb: activate input handlers for raw pointer devices X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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)