Skip to content

Commit

Permalink
widget: get_widget_windows() don't modify window child lists
Browse files Browse the repository at this point in the history
We can't modify the lists returned from gdk_window_peek_children,
instead use get_children().
  • Loading branch information
alexlarsson committed Sep 21, 2015
1 parent b323252 commit d29c488
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gtk/gtkwidget.c
Original file line number Diff line number Diff line change
Expand Up @@ -4991,8 +4991,7 @@ get_widget_windows (GtkWidget *widget)
if (gtk_widget_get_has_window (widget))
window_list = g_list_prepend (NULL, gtk_widget_get_window (widget));
else
window_list = gdk_window_peek_children (gtk_widget_get_window (widget));

window_list = gdk_window_get_children (gtk_widget_get_window (widget));
last = g_list_last (window_list);
ret = NULL;

Expand All @@ -5006,7 +5005,7 @@ get_widget_windows (GtkWidget *widget)
continue;

ret = g_list_prepend (ret, l->data);
children = gdk_window_peek_children (GDK_WINDOW (l->data));
children = gdk_window_get_children (GDK_WINDOW (l->data));

if (children)
{
Expand Down

0 comments on commit d29c488

Please sign in to comment.