Re: [vdagent-win PATCH] vdagent: support sparse monitors config

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

 



Looks good, ACK.

On 05/02/2013 04:17 PM, Arnon Gilboa wrote:
rhbz #953973
---
  vdagent/vdagent.cpp |    6 ++++++
  1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/vdagent/vdagent.cpp b/vdagent/vdagent.cpp
index dde967c..118cafd 100644
--- a/vdagent/vdagent.cpp
+++ b/vdagent/vdagent.cpp
@@ -622,6 +622,11 @@ bool VDAgent::handle_mon_config(VDAgentMonitorsConfig* mon_config, uint32_t port
          VDAgentMonConfig* mon = &mon_config->monitors[i];
          vd_printf("%d. %u*%u*%u (%d,%d) %u", i, mon->width, mon->height, mon->depth, mon->x,
                    mon->y, !!(mon_config->flags & VD_AGENT_CONFIG_MONITORS_FLAG_USE_POS));
+        if (mon->height == 0 && mon->depth == 0) {
+            vd_printf("%d. detaching", i);
+            mode->set_attached(false);
+            continue;
+        }
          mode->set_res(mon->width, mon->height, mon->depth);
          if (mon_config->flags & VD_AGENT_CONFIG_MONITORS_FLAG_USE_POS) {
              mode->set_pos(mon->x, mon->y);
@@ -782,6 +787,7 @@ bool VDAgent::send_announce_capabilities(bool request)
      VD_AGENT_SET_CAPABILITY(caps->caps, VD_AGENT_CAP_REPLY);
      VD_AGENT_SET_CAPABILITY(caps->caps, VD_AGENT_CAP_DISPLAY_CONFIG);
      VD_AGENT_SET_CAPABILITY(caps->caps, VD_AGENT_CAP_CLIPBOARD_BY_DEMAND);
+    VD_AGENT_SET_CAPABILITY(caps->caps, VD_AGENT_CAP_SPARSE_MONITORS_CONFIG);
      vd_printf("Sending capabilities:");
      for (uint32_t i = 0 ; i < caps_size; ++i) {
          vd_printf("%X", caps->caps[i]);

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




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