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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user