[Spice-devel] [spice-html5] display: Only use display channel with id 0

Christophe Fergeau cfergeau at redhat.com
Tue Jul 17 15:05:33 UTC 2018


On Tue, Jul 17, 2018 at 09:51:28AM -0400, Frediano Ziglio wrote:
> > 
> > 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 at redhat.com>
> > ---
> >  main.js | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/main.js b/main.js
> > index 173ff97..5ddc896 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 (chan_id == 0) {
> 
> Did you try it? I think is conn.chan_id or chans.channels[i].id

I did try some variant of it, but clearly not this one as chan_id is
indeed invalid. v2 sent, thanks!

Christophe

> 
> >                      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)
> >              {
> 
> Frediano
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180717/cbe0e432/attachment.sig>


More information about the Spice-devel mailing list