diff options
author | Alexander Larsson <alexl@redhat.com> | 2009-08-13 16:48:07 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2009-08-13 16:49:58 +0200 |
commit | 7667c4d8dc1c1fb558942609a0daa277e35fc7e4 (patch) | |
tree | 48efc8a5feee5ddcf931b22cdf7f8a1bd7a90f48 | |
parent | 9ec4fb60f20ec3bcf18e120b5851d4aa2c5ca570 (diff) | |
download | gtk+-7667c4d8dc1c1fb558942609a0daa277e35fc7e4.tar.gz |
Fix leaks of clip region and outstanding moves
We're never freeing these, do so when destroying.
Fixes bug 589877
-rw-r--r-- | gdk/gdkwindow.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 1c1bb32dad..ba4ad63a3b 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -329,6 +329,7 @@ static void do_move_region_bits_on_impl (GdkWindowObject *private, static void gdk_window_invalidate_in_parent (GdkWindowObject *private); static void move_native_children (GdkWindowObject *private); static void update_cursor (GdkDisplay *display); +static void gdk_window_region_move_free (GdkWindowRegionMove *move); static guint signals[LAST_SIGNAL] = { 0 }; @@ -1867,6 +1868,25 @@ _gdk_window_destroy_hierarchy (GdkWindow *window, g_object_unref (display->pointer_info.toplevel_under_pointer); display->pointer_info.toplevel_under_pointer = NULL; } + + if (private->clip_region) + { + gdk_region_destroy (private->clip_region); + private->clip_region = NULL; + } + + if (private->clip_region_with_children) + { + gdk_region_destroy (private->clip_region_with_children); + private->clip_region_with_children = NULL; + } + + if (private->outstanding_moves) + { + g_list_foreach (private->outstanding_moves, gdk_window_region_move_free, NULL); + g_list_free (private->outstanding_moves); + private->outstanding_moves = NULL; + } } break; } |