summaryrefslogtreecommitdiff
path: root/spice
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-01-10 15:14:44 +0100
committerHans de Goede <hdegoede@redhat.com>2013-01-18 11:53:00 +0100
commit19198574adc0d23fa3fb6fcd9691ab40314978f3 (patch)
tree56b319a4f54392324744249dd893a52e2d2185f3 /spice
parent2c010feeff247383102c271a991620dd72d71f28 (diff)
vd_agent.h: add a VD_AGENT_CAP_SPARSE_MONITORS_CONFIG capability (rhbz#881072)
Currently the agent expect a monitor config to be continuous. If the user has 3 monitors (3 spice display windows) open and tries to disable the 2nd one, then instead of the 2nd one being closed, the 3th one ends up closed. To be able to fix this we need to be able to send a sparse monitor config to the agent. A monitor being disabled in such a sparse config is simply represented by its width and height being 0 in its VDAgentMonConfig. Since old versions of the agent won't be capable of dealing with such a 0x0 sized monitor, this patch adds a new VD_AGENT_CAP_SPARSE_MONITORS_CONFIG capability to signal to the client that the agent understands this, and the client should only send sparse monitor configs to agents with this capability. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'spice')
-rw-r--r--spice/vd_agent.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index b05da3e..b71f7d9 100644
--- a/spice/vd_agent.h
+++ b/spice/vd_agent.h
@@ -98,6 +98,11 @@ typedef struct SPICE_ATTR_PACKED VDAgentFileXferDataMessage {
} VDAgentFileXferDataMessage;
typedef struct SPICE_ATTR_PACKED VDAgentMonConfig {
+ /*
+ * Note a width and height of 0 can be used to indicate a disabled
+ * monitor, this may only be used with agents with the
+ * VD_AGENT_CAP_SPARSE_MONITORS_CONFIG capability.
+ */
uint32_t height;
uint32_t width;
uint32_t depth;
@@ -199,6 +204,7 @@ enum {
VD_AGENT_CAP_DISPLAY_CONFIG,
VD_AGENT_CAP_CLIPBOARD_BY_DEMAND,
VD_AGENT_CAP_CLIPBOARD_SELECTION,
+ VD_AGENT_CAP_SPARSE_MONITORS_CONFIG,
VD_AGENT_END_CAP,
};