diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2020-08-12 15:35:41 +0400 |
---|---|---|
committer | Frediano Ziglio <freddy77@gmail.com> | 2020-09-14 09:41:01 +0100 |
commit | 6918bacfe500fb4fd28ea4006179a355619d0215 (patch) | |
tree | baf8942247262ff8039f53c4be928c3aec7793b9 | |
parent | cbe7b2c28543f4c5e57d1db1b753b73a64104162 (diff) |
vdagent: add a MonitorsMM field to VDAgentMonitorsConfig
Allow to update the physcial dimensions of the monitors,
only sent if the flag PHYSICAL_SIZE is present.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r-- | spice/vd_agent.h | 16 |
1 files changed, 16 insertions, 0 deletions
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), |