Re: [spice-html5 v2] display: Only use display channel with id 0

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

 



> 
> 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@xxxxxxxxxx>

Tested the patch and surely is an improvement.
Not sure if the commit message is misleading. This patch fixes any
multi display channel setup, for instance Windows machines. Yes,
Windows machines are not supported by spice-html5 and there are lot of
glitches trying to connect to such machines but still this patch also
improves this case.

Otherwise,
Acked-by: Frediano Ziglio <fziglio@xxxxxxxxxx>

Frediano

> ---
>  main.js | 7 ++++---
>  1 file 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)
>              {
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




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