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 <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2017-08-04 13:13:22 +02:00
parent 8dfe18a382
commit efb8134815
1 changed files with 2 additions and 0 deletions

View File

@ -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