xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Owen Smith <owen.smith@citrix.com>
To: qemu-devel@nongnu.org
Cc: anthony.perard@citrix.com, xen-devel@lists.xenproject.org,
	sstabellini@kernel.org, kraxel@redhat.com,
	Owen Smith <owen.smith@citrix.com>
Subject: [PATCH 3/4] ui/input: Add activate/remove for keyboard handlers
Date: Thu, 8 Jun 2017 13:15:33 +0000	[thread overview]
Message-ID: <1496927734-29174-4-git-send-email-owen.smith@citrix.com> (raw)
In-Reply-To: <1496927734-29174-1-git-send-email-owen.smith@citrix.com>

Adds missing functions to activate and remove keyboard handlers
* qemu_activate_kbd_event_handler
* qemu_remove_kbd_event_handler

Signed-off-by: Owen Smith <owen.smith@citrix.com>
---
 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)
 {
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-06-08 13:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-08 13:15 [PATCH 0/4] xenfb: Add vkbd-only option Owen Smith
2017-06-08 13:15 ` [PATCH 1/4] xenfb: Add feature-vkbd-standalone Owen Smith
2017-06-08 22:31   ` Stefano Stabellini
2017-06-08 13:15 ` [PATCH 2/4] xenfb: Activate mouse handler Owen Smith
2017-06-08 22:33   ` Stefano Stabellini
2017-06-08 13:15 ` Owen Smith [this message]
2017-06-08 13:39   ` [PATCH 3/4] ui/input: Add activate/remove for keyboard handlers Gerd Hoffmann
2017-06-13 15:01     ` Owen Smith
2017-06-08 13:15 ` [PATCH 4/4] xenfb: Fix leak by adding/removing keyboard handler Owen Smith
2017-06-08 22:24 ` [PATCH 0/4] xenfb: Add vkbd-only option Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1496927734-29174-4-git-send-email-owen.smith@citrix.com \
    --to=owen.smith@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).