summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2023-12-18 11:04:08 +0100
committerPacho Ramos <pacho@gentoo.org>2023-12-18 11:19:11 +0100
commit002602af135042ef47020a2b22478f82c9e1031a (patch)
tree7be3a2df63bea3ba01801c03fa0fcdbd5216852c /x11-wm/mutter
parentx11-wm/mutter: Version bump to 45.2 (diff)
downloadgentoo-002602af135042ef47020a2b22478f82c9e1031a.tar.gz
gentoo-002602af135042ef47020a2b22478f82c9e1031a.tar.bz2
gentoo-002602af135042ef47020a2b22478f82c9e1031a.zip
x11-wm/mutter: Fix memory leak in fullscreen mode
Apply upstream patch to fix a leak when running apps in fullscreen. It will be included in the next point release. Signed-off-by: Pacho Ramos <pacho@gentoo.org>
Diffstat (limited to 'x11-wm/mutter')
-rw-r--r--x11-wm/mutter/files/mutter-45.2-fullscreen-leak.patch37
-rw-r--r--x11-wm/mutter/mutter-45.2.ebuild1
2 files changed, 38 insertions, 0 deletions
diff --git a/x11-wm/mutter/files/mutter-45.2-fullscreen-leak.patch b/x11-wm/mutter/files/mutter-45.2-fullscreen-leak.patch
new file mode 100644
index 000000000000..adbd309c1b7c
--- /dev/null
+++ b/x11-wm/mutter/files/mutter-45.2-fullscreen-leak.patch
@@ -0,0 +1,37 @@
+From bedf8df88f41c34c9824dccba507c8e333dd9ba6 Mon Sep 17 00:00:00 2001
+From: Robert Balas <bluew@r14s.ch>
+Date: Mon, 4 Dec 2023 00:27:49 +0100
+Subject: [PATCH] clutter: Fix memory leak when running in fullscreen
+
+`clutter_stage_do_paint_view()` only gets called when leaving fullscreen
+and by that time enough calls to
+`clutter_actor_get_transformed_paint_volume()` can make the underlying
+GArray grow to a large size.
+
+To fix this, we call call the cleanup function in
+`clutter_stage_finish_layout()` to make it happen every frame.
+
+Co-authored-by: Sebastian Keller <skeller@gnome.org>
+
+Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3191
+Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3439>
+---
+ clutter/clutter/clutter-stage.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
+index 55bb81c2b46..deb383fe216 100644
+--- a/clutter/clutter/clutter-stage.c
++++ b/clutter/clutter/clutter-stage.c
+@@ -970,6 +970,8 @@ clutter_stage_finish_layout (ClutterStage *stage)
+ }
+
+ g_warn_if_fail (!priv->actor_needs_immediate_relayout);
++
++ _clutter_stage_paint_volume_stack_free_all (stage);
+ }
+
+ void
+--
+GitLab
+
diff --git a/x11-wm/mutter/mutter-45.2.ebuild b/x11-wm/mutter/mutter-45.2.ebuild
index f6f42162b174..40a5b53d810c 100644
--- a/x11-wm/mutter/mutter-45.2.ebuild
+++ b/x11-wm/mutter/mutter-45.2.ebuild
@@ -141,6 +141,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-43.0-Disable-anonymous-file-test.patch
+ "${FILESDIR}"/${P}-fullscreen-leak.patch
)
python_check_deps() {