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

Marc-André Lureau marcandre.lureau at gmail.com
Mon Mar 23 04:55:54 PDT 2015


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