From 5bd5007b498d18182af272222a0021af178fc531 Mon Sep 17 00:00:00 2001 From: Friedrich Beckmann Date: Wed, 10 Jun 2015 20:27:55 +0200 Subject: [PATCH] output window: added allocation setting for drawing areas. fixes bug #45229. I added allocation setting to the drawing areas in the output window. The problem occured in osx gtk3 branch and is described in bug #45229. The content of the output window was not rendered correctly in the initial window but only after a resize. Setting the size request for the drawing areas is not enough because the current allocation is not immediatly changed. The clipping is based on the current allocation, while the drawing is based on the results from the rerender function. This problem is related to the problem described in bug #43362. --- src/ui/gui/psppire-output-view.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ui/gui/psppire-output-view.c b/src/ui/gui/psppire-output-view.c index a7de784847..fef0185b03 100644 --- a/src/ui/gui/psppire-output-view.c +++ b/src/ui/gui/psppire-output-view.c @@ -224,6 +224,7 @@ rerender (struct psppire_output_view *view) for (item = view->items; item < &view->items[view->n_items]; item++) { struct xr_rendering *r; + GtkAllocation alloc; int tw, th; if (view->y > 0) @@ -251,6 +252,12 @@ rerender (struct psppire_output_view *view) gtk_layout_move (view->output, item->drawing_area, 0, view->y); } + alloc.x = 0; + alloc.y = view->y; + alloc.width = tw; + alloc.height = th; + gtk_widget_size_allocate(item->drawing_area,&alloc); + if (view->max_width < tw) view->max_width = tw; view->y += th; -- 2.30.2