aboutsummaryrefslogtreecommitdiff
path: root/ui/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/input.c')
-rw-r--r--ui/input.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/ui/input.c b/ui/input.c
index 162e8d8a5a..2761911f3c 100644
--- a/ui/input.c
+++ b/ui/input.c
@@ -334,3 +334,24 @@ MouseInfoList *qmp_query_mice(Error **errp)
return mice_list;
}
+
+void do_mouse_set(Monitor *mon, const QDict *qdict)
+{
+ QemuInputHandlerState *s;
+ int index = qdict_get_int(qdict, "index");
+ int found = 0;
+
+ QTAILQ_FOREACH(s, &handlers, node) {
+ if (s->id == index) {
+ found = 1;
+ qemu_input_handler_activate(s);
+ break;
+ }
+ }
+
+ if (!found) {
+ monitor_printf(mon, "Mouse at given index not found\n");
+ }
+
+ qemu_input_check_mode_change();
+}