From efb8134815e87eaed463893bdebd67336f723db3 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Fri, 4 Aug 2017 13:13:22 +0200 Subject: [PATCH] awful.client.shape: Finish the shape image when done with it This function queries the shape of a client and then does something with it. This commit makes sure the image is finished afterwards, which means that most of its memory is released immediately instead of waiting for the garbage collector to collect it. Related-to: https://github.com/awesomeWM/awesome/issues/1958 Signed-off-by: Uli Schlachter --- lib/awful/client/shape.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/awful/client/shape.lua b/lib/awful/client/shape.lua index ec1d3f61..636600d3 100644 --- a/lib/awful/client/shape.lua +++ b/lib/awful/client/shape.lua @@ -51,6 +51,8 @@ function shape.get_transformed(c, shape_name) cr:set_source_surface(shape_img, border + l, border + t) cr:rectangle(border + l, border + t, geom.width - l - r, geom.height - t - b) cr:fill() + + shape_img:finish() end if _shape then