summaryrefslogtreecommitdiff
path: root/clients/tui/newt/nmt-newt-section.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-10-06 10:48:39 -0400
committerDan Winship <danw@gnome.org>2014-10-07 07:54:47 -0400
commit4f9f33fc3506e5ee153eb910ab8b5b9b5a8f1cce (patch)
treeb451d4a6d994eefd3a034e5f2342602d480942e3 /clients/tui/newt/nmt-newt-section.c
parent9c02e1c742ed19952a7c97a3b278369cf4f36250 (diff)
downloadNetworkManager-4f9f33fc3506e5ee153eb910ab8b5b9b5a8f1cce.tar.gz
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
Diffstat (limited to 'clients/tui/newt/nmt-newt-section.c')
-rw-r--r--clients/tui/newt/nmt-newt-section.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/clients/tui/newt/nmt-newt-section.c b/clients/tui/newt/nmt-newt-section.c
index 12c2bd41c1..df5b188945 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