aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2014-03-16 00:38:45 +0100
committerGerd Hoffmann <kraxel@redhat.com>2014-05-16 08:30:12 +0200
commit528728fd93df348f9003d1067fb26e79f377bfa9 (patch)
tree9a483c17c22f6640071e97319d6e8301b2a0f637
parent02aa76c2ba5df8db7c968d92959af2a7c35690a8 (diff)
input: add qemu_input_handler_deactivate
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--include/ui/input.h1
-rw-r--r--ui/input.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/include/ui/input.h b/include/ui/input.h
index 010c903e80..3d3d487f18 100644
--- a/include/ui/input.h
+++ b/include/ui/input.h
@@ -27,6 +27,7 @@ struct QemuInputHandler {
QemuInputHandlerState *qemu_input_handler_register(DeviceState *dev,
QemuInputHandler *handler);
void qemu_input_handler_activate(QemuInputHandlerState *s);
+void qemu_input_handler_deactivate(QemuInputHandlerState *s);
void qemu_input_handler_unregister(QemuInputHandlerState *s);
void qemu_input_event_send(QemuConsole *src, InputEvent *evt);
void qemu_input_event_sync(void);
diff --git a/ui/input.c b/ui/input.c
index 1ed0e783b1..fc91fba83c 100644
--- a/ui/input.c
+++ b/ui/input.c
@@ -39,6 +39,13 @@ void qemu_input_handler_activate(QemuInputHandlerState *s)
qemu_input_check_mode_change();
}
+void qemu_input_handler_deactivate(QemuInputHandlerState *s)
+{
+ QTAILQ_REMOVE(&handlers, s, node);
+ QTAILQ_INSERT_TAIL(&handlers, s, node);
+ qemu_input_check_mode_change();
+}
+
void qemu_input_handler_unregister(QemuInputHandlerState *s)
{
QTAILQ_REMOVE(&handlers, s, node);