From 4f9f33fc3506e5ee153eb910ab8b5b9b5a8f1cce Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 6 Oct 2014 10:48:39 -0400 Subject: [PATCH] tui: fix some valgrind warnings nmt_newt_grid_size_allocate() depends on nmt_newt_grid_size_request() having been called immediately prior, which would normally be true, except that NmtNewtSection adjusts the label widgets in its border to match its allocation, so when its size changes, it will end up calling size_allocate() on the border with out-of-date requisition data. Fix that by re-size_requesting the border after modifying it. https://bugzilla.gnome.org/show_bug.cgi?id=738010 --- clients/tui/newt/nmt-newt-section.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clients/tui/newt/nmt-newt-section.c b/clients/tui/newt/nmt-newt-section.c index 12c2bd41c..df5b18894 100644 --- a/clients/tui/newt/nmt-newt-section.c +++ b/clients/tui/newt/nmt-newt-section.c @@ -322,7 +322,10 @@ nmt_newt_section_size_allocate (NmtNewtWidget *widget, NmtNewtSectionPrivate *priv = NMT_NEWT_SECTION_GET_PRIVATE (widget); if (priv->show_border) { + int border_height, border_width; + adjust_border_for_allocation (priv, height); + nmt_newt_widget_size_request (priv->border_grid, &border_height, &border_width); nmt_newt_widget_size_allocate (priv->border_grid, x, y, 1, height); nmt_newt_widget_size_allocate (priv->header, x + 2, y, width, priv->hheight_req); } else