awful.mouse.snap: Finish temporary image

This function creates a temporary image surface to set the shape of a
wibox. After this commit, the image is now finished after use. This
results in most of the image's memory to be freed immediately instead of
waiting for the garbage collected 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:14:51 +02:00
parent efb8134815
commit 11216d8ca4
1 changed files with 1 additions and 0 deletions

View File

@ -66,6 +66,7 @@ local function show_placeholder(geo)
cr:stroke()
placeholder_w.shape_bounding = img._native
img:finish()
placeholder_w.visible = true
end