summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Grunt <pgrunt@redhat.com>2015-06-18 17:47:11 +0200
committerPavel Grunt <pgrunt@redhat.com>2015-06-25 15:35:24 +0200
commit5be627986bf00436b8fd48f365fca47dd87b4754 (patch)
tree2a7e854d13883707d309fcad2b5f6c8e20092bb4
parent980798534c51fe21af6476f9d15f4e0e19295b07 (diff)
Send monitor config if guest supports sparse monitors
It is ok to send monitor configuration even for displays which are not disabled or enabled. Because the guest having support for the sparse monitor configuration (VD_AGENT_CAP_SPARSE_MONITORS_CONFIG) will not resize the monitor which is disabled / undefined. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=90914
-rw-r--r--src/channel-main.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/channel-main.c b/src/channel-main.c
index 8f5edf2..d573758 100644
--- a/src/channel-main.c
+++ b/src/channel-main.c
@@ -1428,14 +1428,15 @@ static gboolean timer_set_display(gpointer data)
session = spice_channel_get_session(SPICE_CHANNEL(channel));
- /* ensure we have an explicit monitor configuration at least for
- number of display channels */
- for (i = 0; i < spice_session_get_n_display_channels(session); i++)
- if (c->display[i].display_state == DISPLAY_UNDEFINED) {
- SPICE_DEBUG("Not sending monitors config, missing monitors");
- return FALSE;
- }
-
+ if (!spice_main_agent_test_capability(channel, VD_AGENT_CAP_SPARSE_MONITORS_CONFIG)) {
+ /* ensure we have an explicit monitor configuration at least for
+ number of display channels */
+ for (i = 0; i < spice_session_get_n_display_channels(session); i++)
+ if (c->display[i].display_state == DISPLAY_UNDEFINED) {
+ SPICE_DEBUG("Not sending monitors config, missing monitors");
+ return FALSE;
+ }
+ }
spice_main_send_monitor_config(channel);
return FALSE;