diff -pru dillo/src/dw_gtk_viewport.c dillo2/src/dw_gtk_viewport.c --- dillo/src/dw_gtk_viewport.c Sat May 22 01:42:14 2004 +++ dillo2/src/dw_gtk_viewport.c Mon May 31 14:59:37 2004 @@ -35,6 +35,8 @@ static void Dw_gtk_viewport_class_init static void Dw_gtk_viewport_destroy (GtkObject *object); /* GtkWidget methods */ +static void Dw_gtk_viewport_size_allocate (GtkWidget *widget, + GtkAllocation *allocation); static void Dw_gtk_viewport_realize (GtkWidget *widget); static void Dw_gtk_viewport_unrealize (GtkWidget *widget); static void Dw_gtk_viewport_draw (GtkWidget *widget, @@ -160,6 +162,7 @@ static void Dw_gtk_viewport_class_init ( object_class->destroy = Dw_gtk_viewport_destroy; + widget_class->size_allocate = Dw_gtk_viewport_size_allocate; widget_class->realize = Dw_gtk_viewport_realize; widget_class->unrealize = Dw_gtk_viewport_unrealize; widget_class->draw = Dw_gtk_viewport_draw; @@ -223,6 +226,19 @@ static void Dw_gtk_viewport_destroy (Gtk * GtkWidget methods * * * ***********************/ + +/* + * Standard Gtk+ function + */ +static void Dw_gtk_viewport_size_allocate (GtkWidget *widget, + GtkAllocation *allocation) +{ + GTK_WIDGET_CLASS(parent_class)->size_allocate (widget, allocation); + + /* gtk_layout_size_allocate() sets them to different values. */ + GTK_LAYOUT(widget)->hadjustment->page_increment = allocation->width; + GTK_LAYOUT(widget)->vadjustment->page_increment = allocation->height; +} /* * Standard Gtk+ function