summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2018-07-17 10:05:22 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2018-07-19 14:43:39 +0200
commitf9f700ee549d9d0fd08263f36bbebebe6b011789 (patch)
tree1619a76d3a501ef663061c97824fe040d00550fb
parent969fe1fb6835c11b921b7e7a827705e94a1c82d2 (diff)
display: Only use display channel with id 0
spice-html5 does not support multiple display channels, and will only use the first one offered by spice-server, and ignore the others. This can cause issues when using a VM with a configured but unused org.spice-space.stream.0 spice port as this will create a 'fake' display channel which is offered by spice-server before the usual qxl display channel. This commit favours the display channel with id 0 rather than picking the first one. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r--main.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/main.js b/main.js
index 173ff97..6976f9c 100644
--- a/main.js
+++ b/main.js
@@ -146,10 +146,11 @@ SpiceMainConn.prototype.process_channel_message = function(msg)
};
if (chans.channels[i].type == SPICE_CHANNEL_DISPLAY)
{
- if (this.display !== undefined)
- this.log_warn("The spice-html5 client does not handle multiple heads.");
- else
+ if (chans.channels[i].id == 0) {
this.display = new SpiceDisplayConn(conn);
+ } else {
+ this.log_warn("The spice-html5 client does not handle multiple heads.");
+ }
}
else if (chans.channels[i].type == SPICE_CHANNEL_INPUTS)
{