[gtk+/client-side-windows: 76/284] Ref imp even in non-native windows and don't NULL out in destroy so that get_screen works after dest
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+/client-side-windows: 76/284] Ref imp even in non-native windows and don't NULL out in destroy so that get_screen works after dest
- Date: Thu, 2 Apr 2009 14:06:07 -0400 (EDT)
commit 5378324a1869fba390b25eb748b4afa45ae218f6
Author: Alexander Larsson <alexl redhat com>
Date: Fri Dec 19 14:44:51 2008 +0100
Ref imp even in non-native windows and don't NULL out in destroy so that get_screen works after destroy.
---
gdk/gdkwindow.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index fe76ec7..524b3d7 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -871,7 +871,7 @@ gdk_window_new (GdkWindow *parent,
}
else
{
- private->impl = private->parent->impl;
+ private->impl = g_object_ref (private->parent->impl);
}
recompute_visible_regions (private, TRUE, FALSE);
@@ -912,7 +912,8 @@ change_impl (GdkWindowObject *private,
GdkDrawable *old_impl;
old_impl = private->impl;
- private->impl = new;
+ private->impl = g_object_ref (new);
+ g_object_unref (old_impl);
for (l = private->children; l != NULL; l = l->next)
{
@@ -1359,8 +1360,6 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
{
/* hide to make sure we repaint and break grabs */
gdk_window_hide (window);
- /* NULL out impl so we don't double free it on finalize */
- private->impl = NULL;
}
private->state |= GDK_WINDOW_STATE_WITHDRAWN;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]