From patchwork Thu Jun 8 13:15:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Owen Smith X-Patchwork-Id: 9774681 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 11E2260350 for ; Thu, 8 Jun 2017 13:19:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03D70208C2 for ; Thu, 8 Jun 2017 13:19:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ECCAA2842A; Thu, 8 Jun 2017 13:19:58 +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 6E44C208C2 for ; Thu, 8 Jun 2017 13:19:58 +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 1dIxJE-0001Uf-1A; Thu, 08 Jun 2017 13:17:08 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIxJC-0001UD-Ri for xen-devel@lists.xenproject.org; Thu, 08 Jun 2017 13:17:06 +0000 Received: from [193.109.254.147] by server-8.bemta-6.messagelabs.com id 84/42-03696-25E49395; Thu, 08 Jun 2017 13:17:06 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmkeJIrShJLcpLzFFi42JxWrrBXjfQzzL SYNsJbYvvWyYzOTB6HP5whSWAMYo1My8pvyKBNaPz6muWguM8FQ3LDrA0MP7i7GLk4JAQ8JfY +FSyi5GTg01AQ2JG52IWEFtEQFqif047excjFwezwDRGie8X1jOCJIQFPCT2vNvGBtLLIqAi8 fapNYjJK+AqseaRNEiFhICcxPnjP5lBbE4BN4ktOzrAbCGgkuYfv1khbCWJb4tfgMV5BQQlTs 58AraWWUBC4uCLF8wTGHlnIUnNQpJawMi0ilGjOLWoLLVI19BSL6koMz2jJDcxM0fX0MBMLze 1uDgxPTUnMalYLzk/dxMjMHAYgGAH449lAYcYJTmYlER5FQUsI4X4kvJTKjMSizPii0pzUosP McpwcChJ8P73AcoJFqWmp1akZeYAQxgmLcHBoyQCkeYtLkjMLc5Mh0idYlSUEudl9wVKCIAkM krz4NpgcXOJUVZKmJcR6BAhnoLUotzMElT5V4ziHIxKwrxuIFN4MvNK4Ka/AlrMBLR4yTsLkM UliQgpqQbG3KV2iqpBK+f/Dg3xiDksznPzE5OymOLbuj/Zk9P36ql7nZXLF7SZ/16hxO3dBp5 /72aruQSuSOMQ7mT9zrx1WwXH3mdaT3NneUsFS5hz5D1fyHAz64Ujj7heMcd1z+2BSYoT5Rj8 U7LiPJ9ej4lcePvyZi391SWFSlGBzw5KylRkvYvk363EUpyRaKjFXFScCABD7eiklgIAAA== X-Env-Sender: prvs=325bb5210=owen.smith@citrix.com X-Msg-Ref: server-9.tower-27.messagelabs.com!1496927824!106825711!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.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22658 invoked from network); 8 Jun 2017 13:17:05 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-9.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 8 Jun 2017 13:17:05 -0000 X-IronPort-AV: E=Sophos;i="5.39,315,1493683200"; d="scan'208";a="435636366" From: Owen Smith To: Date: Thu, 8 Jun 2017 13:15:33 +0000 Message-ID: <1496927734-29174-4-git-send-email-owen.smith@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1496927734-29174-1-git-send-email-owen.smith@citrix.com> References: <1496927734-29174-1-git-send-email-owen.smith@citrix.com> MIME-Version: 1.0 Cc: anthony.perard@citrix.com, xen-devel@lists.xenproject.org, sstabellini@kernel.org, kraxel@redhat.com, Owen Smith Subject: [Xen-devel] [PATCH 3/4] ui/input: Add activate/remove for keyboard handlers 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 Adds missing functions to activate and remove keyboard handlers * qemu_activate_kbd_event_handler * qemu_remove_kbd_event_handler Signed-off-by: Owen Smith --- include/ui/console.h | 2 ++ ui/input-legacy.c | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/include/ui/console.h b/include/ui/console.h index 7262bef..f5045e1 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -55,6 +55,8 @@ typedef struct QEMUPutLEDEntry QEMUPutLEDEntry; QEMUPutKbdEntry *qemu_add_kbd_event_handler(QEMUPutKBDEvent *func, void *opaque); +void qemu_remove_kbd_event_handler(QEMUPutKbdEntry *entry); +void qemu_activate_kbd_event_handler(QEMUPutKbdEntry *entry); QEMUPutMouseEntry *qemu_add_mouse_event_handler(QEMUPutMouseEvent *func, void *opaque, int absolute, const char *name); diff --git a/ui/input-legacy.c b/ui/input-legacy.c index 7159747..fbe1ce7 100644 --- a/ui/input-legacy.c +++ b/ui/input-legacy.c @@ -142,6 +142,18 @@ QEMUPutKbdEntry *qemu_add_kbd_event_handler(QEMUPutKBDEvent *func, void *opaque) return entry; } +void qemu_activate_kbd_event_handler(QEMUPutKbdEntry *entry) +{ + qemu_input_handler_activate(entry->s); +} + +void qemu_remove_kbd_event_handler(QEMUPutKbdEntry *entry) +{ + qemu_input_handler_unregister(entry->s); + + g_free(entry); +} + static void legacy_mouse_event(DeviceState *dev, QemuConsole *src, InputEvent *evt) {