mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
surface-actor: Fix leak when setting non-empty clip region
When655b4a9c75
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:
@ -157,10 +157,16 @@ set_clip_region (MetaSurfaceActor *surface_actor,
|
||||
MetaShapedTexture *stex = priv->texture;
|
||||
|
||||
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
|
||||
meta_shaped_texture_set_clip_region (stex, clip_region);
|
||||
{
|
||||
meta_shaped_texture_set_clip_region (stex, clip_region);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user