aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);