|
|
79df40 |
From 80949841b030d5272ae625bc3cca82d2affd09e7 Mon Sep 17 00:00:00 2001
|
|
|
79df40 |
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
|
|
|
79df40 |
Date: Wed, 10 Jul 2019 12:29:26 +0200
|
|
|
79df40 |
Subject: [PATCH 09/28] clutter/actor: Take the marging boxed type if valid
|
|
|
79df40 |
|
|
|
79df40 |
We were using a clutter margin boxed type, copying it instead of passing the
|
|
|
79df40 |
ownership, causing a memory leak.
|
|
|
79df40 |
|
|
|
79df40 |
https://gitlab.gnome.org/GNOME/mutter/merge_requests/682
|
|
|
79df40 |
---
|
|
|
79df40 |
clutter/clutter/clutter-actor.c | 2 +-
|
|
|
79df40 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
79df40 |
|
|
|
79df40 |
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
|
|
|
79df40 |
index 7111d824d..f7b7be0ab 100644
|
|
|
79df40 |
--- a/clutter/clutter/clutter-actor.c
|
|
|
79df40 |
+++ b/clutter/clutter/clutter-actor.c
|
|
|
79df40 |
@@ -14695,61 +14695,61 @@ clutter_actor_parse_custom_node (ClutterScriptable *scriptable,
|
|
|
79df40 |
"written ClutterScript definitions.");
|
|
|
79df40 |
#endif
|
|
|
79df40 |
|
|
|
79df40 |
l = parse_behaviours (script, actor, node);
|
|
|
79df40 |
|
|
|
79df40 |
g_value_init (value, G_TYPE_POINTER);
|
|
|
79df40 |
g_value_set_pointer (value, l);
|
|
|
79df40 |
|
|
|
79df40 |
retval = TRUE;
|
|
|
79df40 |
}
|
|
|
79df40 |
else if (strcmp (name, "actions") == 0 ||
|
|
|
79df40 |
strcmp (name, "constraints") == 0 ||
|
|
|
79df40 |
strcmp (name, "effects") == 0)
|
|
|
79df40 |
{
|
|
|
79df40 |
GSList *l;
|
|
|
79df40 |
|
|
|
79df40 |
l = parse_actor_metas (script, actor, node);
|
|
|
79df40 |
|
|
|
79df40 |
g_value_init (value, G_TYPE_POINTER);
|
|
|
79df40 |
g_value_set_pointer (value, l);
|
|
|
79df40 |
|
|
|
79df40 |
retval = TRUE;
|
|
|
79df40 |
}
|
|
|
79df40 |
else if (strcmp (name, "margin") == 0)
|
|
|
79df40 |
{
|
|
|
79df40 |
ClutterMargin *margin = parse_margin (actor, node);
|
|
|
79df40 |
|
|
|
79df40 |
if (margin)
|
|
|
79df40 |
{
|
|
|
79df40 |
g_value_init (value, CLUTTER_TYPE_MARGIN);
|
|
|
79df40 |
- g_value_set_boxed (value, margin);
|
|
|
79df40 |
+ g_value_take_boxed (value, margin);
|
|
|
79df40 |
retval = TRUE;
|
|
|
79df40 |
}
|
|
|
79df40 |
}
|
|
|
79df40 |
|
|
|
79df40 |
return retval;
|
|
|
79df40 |
}
|
|
|
79df40 |
|
|
|
79df40 |
static void
|
|
|
79df40 |
clutter_actor_set_custom_property (ClutterScriptable *scriptable,
|
|
|
79df40 |
ClutterScript *script,
|
|
|
79df40 |
const gchar *name,
|
|
|
79df40 |
const GValue *value)
|
|
|
79df40 |
{
|
|
|
79df40 |
ClutterActor *actor = CLUTTER_ACTOR (scriptable);
|
|
|
79df40 |
|
|
|
79df40 |
#ifdef CLUTTER_ENABLE_DEBUG
|
|
|
79df40 |
if (G_UNLIKELY (CLUTTER_HAS_DEBUG (SCRIPT)))
|
|
|
79df40 |
{
|
|
|
79df40 |
gchar *tmp = g_strdup_value_contents (value);
|
|
|
79df40 |
|
|
|
79df40 |
CLUTTER_NOTE (SCRIPT,
|
|
|
79df40 |
"in ClutterActor::set_custom_property('%s') = %s",
|
|
|
79df40 |
name,
|
|
|
79df40 |
tmp);
|
|
|
79df40 |
|
|
|
79df40 |
g_free (tmp);
|
|
|
79df40 |
}
|
|
|
79df40 |
#endif /* CLUTTER_ENABLE_DEBUG */
|
|
|
79df40 |
|
|
|
79df40 |
if (strcmp (name, "rotation") == 0)
|
|
|
79df40 |
--
|
|
|
79df40 |
2.26.2
|
|
|
79df40 |
|