Re: [PATCH spice-gtk] spice-widget: Do not invalidate cursor when display is not ready

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

 



ACK.
Do we need to do the same in invalidate() ?

Christophe

On Tue, Apr 07, 2015 at 06:26:31PM +0200, Pavel Grunt wrote:
> spice_display_get_scaling() gives wrong x, y coordinates and scaling
> when the display is not ready. The wrong values cause runtime
> warnings when disabling a virt-viewer's window:
> Gtk-CRITICAL **: gtk_widget_queue_draw_area: assertion 'width >= 0' failed
> ---
>  gtk/spice-widget.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
> index f5e8aab..b9c4972 100644
> --- a/gtk/spice-widget.c
> +++ b/gtk/spice-widget.c
> @@ -2347,6 +2347,9 @@ static void cursor_invalidate(SpiceDisplay *display)
>      if (d->mouse_pixbuf == NULL)
>          return;
>  
> +    if (!d->ready || !d->monitor_ready)
> +        return;
> +
>      spice_display_get_scaling(display, &s, &x, &y, NULL, NULL);
>  
>      gtk_widget_queue_draw_area(GTK_WIDGET(display),
> -- 
> 2.3.4
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: pgpBJNpBelwfB.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

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