[gtk+/wip/baedert/children: 14/46] widget: Unparent widgets in dispose()
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/children: 14/46] widget: Unparent widgets in dispose()
- Date: Sat, 3 Dec 2016 12:19:51 +0000 (UTC)
commit 014c63e6fb4f71e84e964d456fb33c1d9f76249b
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 eea9cb9..e592415 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -10482,8 +10482,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]