> ACK. > Do we need to do the same in invalidate() ? > > Christophe I don't think it is needed (invalidate is called with values > 0), maybe it could be an optimization. Pavel > > 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 > _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel