[gtk+/wip/baedert/children: 52/57] widget: Unparent widgets in dispose()
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/children: 52/57] widget: Unparent widgets in dispose()
- Date: Sat, 19 Nov 2016 19:51:41 +0000 (UTC)
commit 3f7fc8ceea1069ca1f2dd478b0f3ddbf83d152d1
Author: Timm Bäder <mail baedert org>
Date: Fri Nov 18 10:02:22 2016 +0100
widget: Unparent widgets in dispose()
If they have a non-container parent.
gtk/gtkwidget.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 72f71b5..3f43781 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -10491,8 +10491,10 @@ gtk_widget_dispose (GObject *object)
GtkWidgetPrivate *priv = widget->priv;
GSList *sizegroups;
- if (priv->parent)
+ if (priv->parent && GTK_IS_CONTAINER (priv->parent))
gtk_container_remove (GTK_CONTAINER (priv->parent), widget);
+ else if (priv->parent)
+ gtk_widget_unparent (widget);
else if (_gtk_widget_get_visible (widget))
gtk_widget_hide (widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]