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:
parent
8dfe18a382
commit
efb8134815
|
@ -51,6 +51,8 @@ function shape.get_transformed(c, shape_name)
|
||||||
cr:set_source_surface(shape_img, border + l, border + t)
|
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:rectangle(border + l, border + t, geom.width - l - r, geom.height - t - b)
|
||||||
cr:fill()
|
cr:fill()
|
||||||
|
|
||||||
|
shape_img:finish()
|
||||||
end
|
end
|
||||||
|
|
||||||
if _shape then
|
if _shape then
|
||||||
|
|
Loading…
Reference in New Issue