aboutsummaryrefslogtreecommitdiff
path: root/ui/input.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-12-10 17:16:03 +0100
committerGerd Hoffmann <kraxel@redhat.com>2014-03-05 09:52:04 +0100
commit70b52f62b8a94c34ccc939f374bcd00c22a8e3c4 (patch)
tree727125337b1c8b92672b2e311b00748ef9b6d4dd /ui/input.c
parente842c68d449a51ec51a0442aa0fe237d4a4b736d (diff)
input: move do_mouse_set to new core
This removes the last user of the lecagy input mouse handler list, so we can remove more legacy bits with this. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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();
+}