[RFC/POC PATCH spice-protocol 02/16] Create a version 2 of the VDAgentMonitorsConfig message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To keep compatibility with old endpoints (any of client, server,
vd_agent), we need to copy the message to add the output_id field.

The output_id is the guest-side id of the xrandr output (to be precise,
it is the index in the list of xrandr outputs) that is set in the
monitors config messages by the streaming agent. It is later used in the
guest by vd_agent for mouse input and possibly monitors_config
(enabling/disabling monitors and setting the resolution/position of
monitors).

Signed-off-by: Lukáš Hrázký <lhrazky@xxxxxxxxxx>
---
 spice/vd_agent.h | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index dda7044..05c9c40 100644
--- a/spice/vd_agent.h
+++ b/spice/vd_agent.h
@@ -154,6 +154,33 @@ typedef struct SPICE_ATTR_PACKED VDAgentMonitorsConfig {
     VDAgentMonConfig monitors[0];
 } VDAgentMonitorsConfig;
 
+typedef struct SPICE_ATTR_PACKED VDAgentMonConfigV2 {
+    /* The output_id is the guest-side id of the xrandr output (to be precise,
+     * it is the index in the list of xrandr outputs) that is set in the
+     * monitors config messages by the streaming agent. It is later used in the
+     * guest by vd_agent for mouse input and possibly monitors_config
+     * (enabling/disabling monitors and setting the resolution/position of
+     * monitors).
+    */
+    uint32_t output_id;
+    /*
+     * 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;
+    int32_t x;
+    int32_t y;
+} VDAgentMonConfigV2;
+
+typedef struct SPICE_ATTR_PACKED VDAgentMonitorsConfigV2 {
+    uint32_t num_of_monitors;
+    uint32_t flags;
+    VDAgentMonConfigV2 monitors[0];
+} VDAgentMonitorsConfigV2;
+
 enum {
     VD_AGENT_DISPLAY_CONFIG_FLAG_DISABLE_WALLPAPER = (1 << 0),
     VD_AGENT_DISPLAY_CONFIG_FLAG_DISABLE_FONT_SMOOTH = (1 << 1),
-- 
2.17.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]