summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-03-03 06:40:53 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-03-03 06:40:53 +0000
commitd74feca09e34efe3f89013512731e315d88fc813 (patch)
tree822868f106d4e4ad060af9b95c4ecf7c1cfd1f19
parentaad5057b51b1e1638f6089fe2495e75e6f18a026 (diff)
downloadgtk+-d74feca09e34efe3f89013512731e315d88fc813.tar.gz
Avoid warnings if gtk_widget_reparent() is called at unusual times.
2005-03-03 Matthias Clasen <mclasen@redhat.com> * gtk/gtkwidget.c (gtk_widget_reparent_subwindows): Avoid warnings if gtk_widget_reparent() is called at unusual times. (#168966, Christian Persch)
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-2-106
-rw-r--r--ChangeLog.pre-2-86
-rw-r--r--gtk/gtkwidget.c30
4 files changed, 36 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a218dd9d2..4f08c210aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-03 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_reparent_subwindows):
+ Avoid warnings if gtk_widget_reparent() is called at
+ unusual times. (#168966, Christian Persch)
+
Tue Mar 1 14:04:08 2005 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkproperty-x11.c (virtual_atom_check_init): Cast to avoid
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 3a218dd9d2..4f08c210aa 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,9 @@
+2005-03-03 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_reparent_subwindows):
+ Avoid warnings if gtk_widget_reparent() is called at
+ unusual times. (#168966, Christian Persch)
+
Tue Mar 1 14:04:08 2005 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkproperty-x11.c (virtual_atom_check_init): Cast to avoid
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 3a218dd9d2..4f08c210aa 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,9 @@
+2005-03-03 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkwidget.c (gtk_widget_reparent_subwindows):
+ Avoid warnings if gtk_widget_reparent() is called at
+ unusual times. (#168966, Christian Persch)
+
Tue Mar 1 14:04:08 2005 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkproperty-x11.c (virtual_atom_check_init): Cast to avoid
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 3a4f76bd85..29ee934a9e 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3730,21 +3730,27 @@ gtk_widget_reparent_subwindows (GtkWidget *widget,
}
else
{
- GdkWindow *parent = gdk_window_get_parent (widget->window);
+ GdkWindow *parent;
+ GList *tmp_list, *children;
- GList *children = gdk_window_get_children (parent);
- GList *tmp_list;
- for (tmp_list = children; tmp_list; tmp_list = tmp_list->next)
- {
- GtkWidget *child;
- GdkWindow *window = tmp_list->data;
+ parent = gdk_window_get_parent (widget->window);
- gdk_window_get_user_data (window, (void **)&child);
- if (child == widget)
- gdk_window_reparent (window, new_window, 0, 0);
+ if (parent)
+ {
+ children = gdk_window_get_children (parent);
+
+ for (tmp_list = children; tmp_list; tmp_list = tmp_list->next)
+ {
+ GtkWidget *child;
+ GdkWindow *window = tmp_list->data;
+
+ gdk_window_get_user_data (window, (void **)&child);
+ if (child == widget)
+ gdk_window_reparent (window, new_window, 0, 0);
+ }
+
+ g_list_free (children);
}
-
- g_list_free (children);
}
}