From 6918bacfe500fb4fd28ea4006179a355619d0215 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Wed, 12 Aug 2020 15:35:41 +0400 Subject: vdagent: add a MonitorsMM field to VDAgentMonitorsConfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow to update the physcial dimensions of the monitors, only sent if the flag PHYSICAL_SIZE is present. Signed-off-by: Marc-André Lureau Signed-off-by: Frediano Ziglio Acked-by: Frediano Ziglio --- spice/vd_agent.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/spice/vd_agent.h b/spice/vd_agent.h index baade9a..a479128 100644 --- a/spice/vd_agent.h +++ b/spice/vd_agent.h @@ -205,14 +205,30 @@ typedef struct SPICE_ATTR_PACKED VDAgentMonConfig { enum { VD_AGENT_CONFIG_MONITORS_FLAG_USE_POS = (1 << 0), + VD_AGENT_CONFIG_MONITORS_FLAG_PHYSICAL_SIZE = (1 << 1), }; typedef struct SPICE_ATTR_PACKED VDAgentMonitorsConfig { uint32_t num_of_monitors; uint32_t flags; VDAgentMonConfig monitors[0]; + /* only sent if the FLAG_PHYSICAL_SIZE is present: */ + /* VDAgentMonitorMM physical_sizes[0]; */ } VDAgentMonitorsConfig; + +/* Physical size of the monitor in millimeters. + * Having this information, the remote/guest display can configure itself with + * appropriate font & scaling to maintain readability. */ +typedef struct SPICE_ATTR_PACKED VDAgentMonitorMM { + /* + * Note a width and height of 0 can be used to indicate a disabled + * monitor or no size information is present. + */ + uint16_t height; + uint16_t width; +} VDAgentMonitorMM; + enum { VD_AGENT_DISPLAY_CONFIG_FLAG_DISABLE_WALLPAPER = (1 << 0), VD_AGENT_DISPLAY_CONFIG_FLAG_DISABLE_FONT_SMOOTH = (1 << 1), -- cgit v1.2.3