[goffice] Canvas: avoid leak.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Canvas: avoid leak.
- Date: Thu, 8 Jan 2015 22:05:17 +0000 (UTC)
commit af9d2dcc849d22bca29e5e77264921075e4f278c
Author: Morten Welinder <terra gnome org>
Date: Thu Jan 8 17:04:59 2015 -0500
Canvas: avoid leak.
ChangeLog | 5 +++++
goffice/canvas/goc-widget.c | 7 +++++++
2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 416079d..b55d3d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-08 Morten Welinder <terra gnome org>
+
+ * goffice/canvas/goc-widget.c (goc_offscreen_box_unrealize): Undo
+ the embedder part of realization too.
+
2015-01-08 Jean Brefort <jean brefort normalesup org>
* goffice/graph/gog-axis-line.c (gog_axis_line_get_ticks): don't return
diff --git a/goffice/canvas/goc-widget.c b/goffice/canvas/goc-widget.c
index 23de5df..e7b3b7d 100644
--- a/goffice/canvas/goc-widget.c
+++ b/goffice/canvas/goc-widget.c
@@ -261,6 +261,13 @@ goc_offscreen_box_unrealize (GtkWidget *widget)
{
GocOffscreenBox *offscreen_box = GOC_OFFSCREEN_BOX (widget);
+ gdk_offscreen_window_set_embedder (offscreen_box->offscreen_window, NULL);
+
+ if (offscreen_box->child) {
+ gtk_widget_unrealize (offscreen_box->child);
+ gtk_widget_set_parent_window (offscreen_box->child, NULL);
+ }
+
gdk_window_set_user_data (offscreen_box->offscreen_window, NULL);
gdk_window_destroy (offscreen_box->offscreen_window);
offscreen_box->offscreen_window = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]