diff -Nru mutter-3.30.1/debian/changelog mutter-3.30.1/debian/changelog --- mutter-3.30.1/debian/changelog 2018-10-15 04:46:58.000000000 +1100 +++ mutter-3.30.1/debian/changelog 2018-10-31 17:20:02.000000000 +1100 @@ -1,3 +1,10 @@ +mutter (3.30.1-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Apply upstream's patch to fix memory leak + + -- Matthew Harm Bekkema Wed, 31 Oct 2018 17:20:02 +1100 + mutter (3.30.1-2) unstable; urgency=medium * Only Build-Depend on libdrm-dev and libgbm-dev on Linux diff -Nru mutter-3.30.1/debian/patches/0001-constraints-Make-current-placement-rule-stack-alloca.patch mutter-3.30.1/debian/patches/0001-constraints-Make-current-placement-rule-stack-alloca.patch --- mutter-3.30.1/debian/patches/0001-constraints-Make-current-placement-rule-stack-alloca.patch 1970-01-01 10:00:00.000000000 +1000 +++ mutter-3.30.1/debian/patches/0001-constraints-Make-current-placement-rule-stack-alloca.patch 2018-10-31 17:15:23.000000000 +1100 @@ -0,0 +1,94 @@ +From 71a62bb18fe3aebc6668bd37ef6917398ef71ae1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20=C3=85dahl?= +Date: Sat, 20 Oct 2018 15:46:37 +0200 +Subject: [PATCH 1/2] constraints: Make current placement rule stack allocated + +We're not going to keep it past the function scope, so no reason to put +it on the heap. We also didn't free it, so this'll fix a memory leak. + +https://gitlab.gnome.org/GNOME/gnome-shell/issues/653 +--- + src/core/constraints.c | 21 ++++++++++----------- + 1 file changed, 10 insertions(+), 11 deletions(-) + +diff --git a/src/core/constraints.c b/src/core/constraints.c +index a205ea0fd..3652b3d8e 100644 +--- a/src/core/constraints.c ++++ b/src/core/constraints.c +@@ -787,7 +787,7 @@ constrain_custom_rule (MetaWindow *window, + MetaPlacementRule *placement_rule; + MetaRectangle intersection; + gboolean constraint_satisfied; +- MetaPlacementRule *current_rule; ++ MetaPlacementRule current_rule; + MetaWindow *parent; + MetaRectangle parent_rect; + +@@ -820,25 +820,24 @@ constrain_custom_rule (MetaWindow *window, + if (check_only) + return constraint_satisfied; + +- current_rule = g_new0 (MetaPlacementRule, 1); +- *current_rule = *placement_rule; ++ current_rule = *placement_rule; + + if (constraint_satisfied) + goto done; + + if (info->current.width != intersection.width && +- (current_rule->constraint_adjustment & ++ (current_rule.constraint_adjustment & + META_PLACEMENT_CONSTRAINT_ADJUSTMENT_FLIP_X)) + { +- try_flip_window_position (window, info, current_rule, ++ try_flip_window_position (window, info, ¤t_rule, + META_PLACEMENT_CONSTRAINT_ADJUSTMENT_FLIP_X, + &info->current, &intersection); + } + if (info->current.height != intersection.height && +- (current_rule->constraint_adjustment & ++ (current_rule.constraint_adjustment & + META_PLACEMENT_CONSTRAINT_ADJUSTMENT_FLIP_Y)) + { +- try_flip_window_position (window, info, current_rule, ++ try_flip_window_position (window, info, ¤t_rule, + META_PLACEMENT_CONSTRAINT_ADJUSTMENT_FLIP_Y, + &info->current, &intersection); + } +@@ -852,7 +851,7 @@ constrain_custom_rule (MetaWindow *window, + if (constraint_satisfied) + goto done; + +- if (current_rule->constraint_adjustment & ++ if (current_rule.constraint_adjustment & + META_PLACEMENT_CONSTRAINT_ADJUSTMENT_SLIDE_X) + { + if (info->current.x != intersection.x) +@@ -860,7 +859,7 @@ constrain_custom_rule (MetaWindow *window, + else if (info->current.width != intersection.width) + info->current.x -= info->current.width - intersection.width; + } +- if (current_rule->constraint_adjustment & ++ if (current_rule.constraint_adjustment & + META_PLACEMENT_CONSTRAINT_ADJUSTMENT_SLIDE_Y) + { + if (info->current.y != intersection.y) +@@ -878,13 +877,13 @@ constrain_custom_rule (MetaWindow *window, + if (constraint_satisfied) + goto done; + +- if (current_rule->constraint_adjustment & ++ if (current_rule.constraint_adjustment & + META_PLACEMENT_CONSTRAINT_ADJUSTMENT_RESIZE_X) + { + info->current.x = intersection.x; + info->current.width = intersection.width; + } +- if (current_rule->constraint_adjustment & ++ if (current_rule.constraint_adjustment & + META_PLACEMENT_CONSTRAINT_ADJUSTMENT_RESIZE_Y) + { + info->current.y = intersection.y; +-- +2.19.1 + diff -Nru mutter-3.30.1/debian/patches/0002-shaped-texture-Clean-up-texture-regions.patch mutter-3.30.1/debian/patches/0002-shaped-texture-Clean-up-texture-regions.patch --- mutter-3.30.1/debian/patches/0002-shaped-texture-Clean-up-texture-regions.patch 1970-01-01 10:00:00.000000000 +1000 +++ mutter-3.30.1/debian/patches/0002-shaped-texture-Clean-up-texture-regions.patch 2018-10-31 17:15:23.000000000 +1100 @@ -0,0 +1,37 @@ +From 8200995fdbf04b2763d33cd30d7c8174eebc1736 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20=C3=85dahl?= +Date: Sat, 20 Oct 2018 15:47:50 +0200 +Subject: [PATCH 2/2] shaped-texture: Clean up texture regions + +We allocated texture regions, but didn't free them when finished, +causing a leak. + +https://gitlab.gnome.org/GNOME/gnome-shell/issues/653 +--- + src/compositor/meta-shaped-texture.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c +index 5328a919e..cd151a28e 100644 +--- a/src/compositor/meta-shaped-texture.c ++++ b/src/compositor/meta-shaped-texture.c +@@ -516,6 +516,7 @@ meta_shaped_texture_paint (ClutterActor *actor) + } + else + { ++ opaque_tex_region = NULL; + use_opaque_region = FALSE; + } + +@@ -659,6 +660,8 @@ meta_shaped_texture_paint (ClutterActor *actor) + } + } + ++ g_clear_pointer (&clip_tex_region, cairo_region_destroy); ++ g_clear_pointer (&opaque_tex_region, cairo_region_destroy); + g_clear_pointer (&blended_tex_region, cairo_region_destroy); + } + +-- +2.19.1 + diff -Nru mutter-3.30.1/debian/patches/series mutter-3.30.1/debian/patches/series --- mutter-3.30.1/debian/patches/series 2018-10-15 04:46:58.000000000 +1100 +++ mutter-3.30.1/debian/patches/series 2018-10-31 17:18:07.000000000 +1100 @@ -2,5 +2,7 @@ theme-load-icons-as-Gtk-does-with-fallback-and-RTL-suppor.patch clutter-Smooth-out-master-clock-to-smooth-visuals.patch bgo768531_workaround-startup-notifications.patch +0001-constraints-Make-current-placement-rule-stack-alloca.patch +0002-shaped-texture-Clean-up-texture-regions.patch debian/synaptics-support.patch debian/skip-texture-test.patch