mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-09 06:10:29 +01:00
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:
parent
9c02e1c742
commit
4f9f33fc35
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue