[virt-tools-list] [PATCH virt-viewer] display: Allocate size for parent

Victor Toso lists at victortoso.com
Mon Apr 25 08:00:19 UTC 2016


Hi,

On Fri, Apr 22, 2016 at 03:06:27PM +0200, Pavel Grunt wrote:
> Silence runtime warning with Gtk+3.20
>  Gtk-WARNING **: Drawing a gadget with negative dimensions.
>  Did you forget to allocate a size? (node box owner ViewAutoDrawer)
>
> Related: rhbz#1327269

It did not work for me. gtk is 3.20.2

Cheers,
  toso

> ---
>  src/virt-viewer-display.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/virt-viewer-display.c b/src/virt-viewer-display.c
> index 16fb930..f713c76 100644
> --- a/src/virt-viewer-display.c
> +++ b/src/virt-viewer-display.c
> @@ -411,6 +411,9 @@ virt_viewer_display_size_allocate(GtkWidget *widget,
>      GtkWidget *child = gtk_bin_get_child(bin);
>  
>      g_debug("Allocated %dx%d", allocation->width, allocation->height);
> +
> +    GTK_WIDGET_CLASS(virt_viewer_display_parent_class)->size_allocate(widget, allocation);
> +
>      gtk_widget_set_allocation(widget, allocation);
>  
>      if (priv->desktopWidth == 0 || priv->desktopHeight == 0 ||
> -- 
> 2.8.1
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list




More information about the virt-tools-list mailing list