diff options
author | Alon Levy <alevy@redhat.com> | 2012-03-29 23:23:14 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-05-03 10:45:04 +0200 |
commit | 4efee029cbd5dc3aaa422edc10447f3659df7754 (patch) | |
tree | 095e805e85a811d90038a3e0629d332dfe4ce68e /ui/spice-core.c | |
parent | 7e3efdac75caca0b283f8e76ad24c924b4718e7b (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/spice-core.c')
-rw-r--r-- | ui/spice-core.c | 7 |
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(); |