mirror of
https://github.com/brl/mutter.git
synced 2025-02-28 18:54:08 +00:00
surface-actor: Fix leak when setting non-empty clip region
When 655b4a9c75 ported this to MtkRegion, it removed the unref of the copied region after setting it in the shaped texture. Fixes: 655b4a9c7 ("Port to MtkRegion") Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3140 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3365>
This commit is contained in:
parent
a772c709aa
commit
145cac3a37
@ -157,10 +157,16 @@ set_clip_region (MetaSurfaceActor *surface_actor,
|
|||||||
MetaShapedTexture *stex = priv->texture;
|
MetaShapedTexture *stex = priv->texture;
|
||||||
|
|
||||||
if (clip_region && !mtk_region_is_empty (clip_region))
|
if (clip_region && !mtk_region_is_empty (clip_region))
|
||||||
meta_shaped_texture_set_clip_region (stex,
|
{
|
||||||
mtk_region_copy (clip_region));
|
g_autoptr (MtkRegion) clip_region_copy = NULL;
|
||||||
|
|
||||||
|
clip_region_copy = mtk_region_copy (clip_region);
|
||||||
|
meta_shaped_texture_set_clip_region (stex, clip_region_copy);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
meta_shaped_texture_set_clip_region (stex, clip_region);
|
meta_shaped_texture_set_clip_region (stex, clip_region);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user