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

Pavel Grunt pgrunt at redhat.com
Fri Apr 22 13:06:27 UTC 2016


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
---
 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




More information about the virt-tools-list mailing list