gears.surface.apply_shape_bounding: Finish temporary image

This function draws the wanted shape to a cairo image surface and then
uses it to set the shape of the passed-in object. After this commit,
this temporary image is finished afterwards, making it free most of its
memory immediately instead of only later when the garbage collector
collects the image surface.

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:18:01 +02:00
parent 0da790c026
commit e73eb3ad38
1 changed files with 1 additions and 0 deletions

View File

@ -204,6 +204,7 @@ function surface.apply_shape_bounding(draw, shape, ...)
cr:fill()
draw.shape_bounding = img._native
img:finish()
end
local function no_op() end