[Spice-commits] spice/vd_agent.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Sep 14 08:41:14 UTC 2020


 spice/vd_agent.h |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

New commits:
commit 6918bacfe500fb4fd28ea4006179a355619d0215
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Wed Aug 12 15:35:41 2020 +0400

    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 at redhat.com>
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

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),


More information about the Spice-commits mailing list