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:
parent
0da790c026
commit
e73eb3ad38
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue