Do not leak list when drawing notebook.
When we construct the list in the other order we must free it. https://bugzilla.gnome.org/show_bug.cgi?id=646886
This commit is contained in:
parent
db74a6e816
commit
c4e17bb148
@ -4921,7 +4921,7 @@ gtk_notebook_paint (GtkWidget *widget,
|
|||||||
GtkNotebookPrivate *priv;
|
GtkNotebookPrivate *priv;
|
||||||
GtkNotebookPage *page;
|
GtkNotebookPage *page;
|
||||||
GtkAllocation allocation;
|
GtkAllocation allocation;
|
||||||
GList *children, *other_order;
|
GList *children;
|
||||||
gboolean showarrow;
|
gboolean showarrow;
|
||||||
gint width, height;
|
gint width, height;
|
||||||
gint x, y;
|
gint x, y;
|
||||||
@ -5093,7 +5093,7 @@ gtk_notebook_paint (GtkWidget *widget,
|
|||||||
|
|
||||||
if (children != NULL)
|
if (children != NULL)
|
||||||
{
|
{
|
||||||
other_order = NULL;
|
GList *other_order = NULL;
|
||||||
|
|
||||||
while (children)
|
while (children)
|
||||||
{
|
{
|
||||||
@ -5109,17 +5109,15 @@ gtk_notebook_paint (GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* draw them with the opposite order */
|
/* draw them with the opposite order */
|
||||||
children = other_order;
|
for (children = other_order; children; children = children->next)
|
||||||
|
|
||||||
while (children)
|
|
||||||
{
|
{
|
||||||
page = children->data;
|
page = children->data;
|
||||||
|
|
||||||
tab_flags = _gtk_notebook_get_tab_flags (notebook, page);
|
tab_flags = _gtk_notebook_get_tab_flags (notebook, page);
|
||||||
gtk_notebook_draw_tab (notebook, page, cr, tab_flags);
|
gtk_notebook_draw_tab (notebook, page, cr, tab_flags);
|
||||||
|
|
||||||
children = children->next;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_list_free (other_order);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showarrow && priv->scrollable)
|
if (showarrow && priv->scrollable)
|
||||||
|
Loading…
Reference in New Issue
Block a user