[gtk+/overlay: 11/34] overlay: do not leak the window when removing a widget
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/overlay: 11/34] overlay: do not leak the window when removing a widget
- Date: Sat, 11 Jun 2011 00:59:34 +0000 (UTC)
commit d4bb53137d64573084b05a87e20ec4296755859b
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu May 26 22:49:24 2011 +0200
overlay: do not leak the window when removing a widget
gtk/gtkoverlay.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkoverlay.c b/gtk/gtkoverlay.c
index 4d03b60..43f6862 100644
--- a/gtk/gtkoverlay.c
+++ b/gtk/gtkoverlay.c
@@ -465,6 +465,12 @@ gtk_overlay_remove (GtkContainer *overlay,
if (child->widget == widget)
{
+ if (child->window != NULL && child->widget != priv->main_widget)
+ {
+ gdk_window_set_user_data (child->window, NULL);
+ gdk_window_destroy (child->window);
+ }
+
gtk_widget_unparent (widget);
priv->children = g_slist_delete_link (priv->children,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]