[Spice-devel] Fwd: [spice-gtk PATCH] Single headed monitor updates should start at 0, 0

Sandy Stutsman sstutsma at redhat.com
Mon Mar 23 07:55:30 PDT 2015


This bug is a consequence of adding position information to the Windows's driver monitor_escape message passed to the client from the spice server.  Windows qxl drivers service at most one monitor, so if the position information for each monitor is in the message, there will be monitors that have non-zero positions.  Without the change only a portion of the monitor's frame buffer will be displayed in the client window from (x,y) to (width,height).

I've only tested this with remote-viewer...I'll try with virt-viewer today.

----- Original Message -----
From: "Marc-André Lureau" <marcandre.lureau at gmail.com>
To: "Sandy Stutsman" <sstutsma at redhat.com>
Cc: spice-devel at freedesktop.org
Sent: Monday, March 23, 2015 7:55:54 AM
Subject: Re: [Spice-devel] Fwd: [spice-gtk PATCH] Single headed monitor updates should start at 0, 0

Hi,

On Sat, Mar 21, 2015 at 12:07 AM, Sandy Stutsman <sstutsma at redhat.com> wrote:
>
>
> ----- Forwarded Message -----
> From: sstutsma at redhat.com
> To: spice-devel at lists.freedesktop.org
> Cc: "Sandy Stutsman" <sstutsma at redhat.com>
> Sent: Wednesday, March 11, 2015 1:35:35 PM
> Subject: [spice-gtk PATCH] Single headed monitor updates should start at 0,0
>
> From: Sandy Stutsman <sstutsma at redhat.com>
>
> For Windows VMs, each monitor is driven by its own instance of the qxl
> driver, so monitors have only one head.  With the addition of the
> monitors_config message in the Windows Driver, it is now possible to
> have a single headed monitor with a non zero position.  Even so, the
> update_area call should be for the whole monitor extent.

What happens otherwise? which bug is this fixing?

Also, have you checked the behaviour with virt-viewer? Most of the
monitor layout logic has been pushed there these days, it may behave
differently.

> ---
>  gtk/spice-widget.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
> index f5e8aab..8f3fd1a 100644
> --- a/gtk/spice-widget.c
> +++ b/gtk/spice-widget.c
> @@ -297,7 +297,13 @@ static void update_monitor_area(SpiceDisplay *display)
>          spice_main_update_display(d->main, get_display_id(display),
>                                    c->x, c->y, c->width, c->height, FALSE);
>
> -    update_area(display, c->x, c->y, c->width, c->height);
> +
> +    //If only one head on this monitor x,y should always be treated as zero
> +    if (monitors->len == 1)
> +        update_area(display, 0, 0, c->width, c->height);
> +    else
> +        update_area(display, c->x, c->y, c->width, c->height);
> +
>      g_clear_pointer(&monitors, g_array_unref);
>      return;
>
> --
> 2.1.0
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel



-- 
Marc-André Lureau


More information about the Spice-devel mailing list