Just connect to the signal --- src/virt-viewer-display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/virt-viewer-display.c b/src/virt-viewer-display.c index 2dbaba1..20ae9af 100644 --- a/src/virt-viewer-display.c +++ b/src/virt-viewer-display.c @@ -91,7 +91,6 @@ virt_viewer_display_class_init(VirtViewerDisplayClass *class) widget_class->get_preferred_width = virt_viewer_display_get_preferred_width; widget_class->get_preferred_height = virt_viewer_display_get_preferred_height; - widget_class->size_allocate = virt_viewer_display_size_allocate; widget_class->grab_focus = virt_viewer_display_grab_focus; g_object_class_install_property(object_class, @@ -254,6 +253,8 @@ virt_viewer_display_init(VirtViewerDisplay *display) display->priv->desktopWidth = MIN_DISPLAY_WIDTH; display->priv->desktopHeight = MIN_DISPLAY_HEIGHT; display->priv->zoom_level = NORMAL_ZOOM_LEVEL; + + g_signal_connect(display, "size-allocate", G_CALLBACK(virt_viewer_display_size_allocate), NULL); } GtkWidget* @@ -411,7 +412,6 @@ 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_set_allocation(widget, allocation); if (priv->desktopWidth == 0 || priv->desktopHeight == 0 || child == NULL || !gtk_widget_get_visible(child)) -- 2.9.2 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list