aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2012-03-29 23:23:14 +0200
committerGerd Hoffmann <kraxel@redhat.com>2012-05-03 10:45:04 +0200
commit4efee029cbd5dc3aaa422edc10447f3659df7754 (patch)
tree095e805e85a811d90038a3e0629d332dfe4ce68e /ui
parent7e3efdac75caca0b283f8e76ad24c924b4718e7b (diff)
spice_info: add mouse_mode
Add mouse_mode, either server or mouse, to qmp and hmp commands, based on spice_server_is_server_mouse added in spice-server 0.10.3. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/spice-core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/spice-core.c b/ui/spice-core.c
index a468524799..4fc48f8902 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -462,6 +462,13 @@ SpiceInfo *qmp_query_spice(Error **errp)
info->tls_port = tls_port;
}
+#if SPICE_SERVER_VERSION >= 0x000a03 /* 0.10.3 */
+ info->mouse_mode = spice_server_is_server_mouse(spice_server) ?
+ SPICE_QUERY_MOUSE_MODE_SERVER :
+ SPICE_QUERY_MOUSE_MODE_CLIENT;
+#else
+ info->mouse_mode = SPICE_QUERY_MOUSE_MODE_UNKNOWN;
+#endif
/* for compatibility with the original command */
info->has_channels = true;
info->channels = qmp_query_spice_channels();