From 11216d8ca4b4e8bb08242e5382fb7984cff6ae50 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Fri, 4 Aug 2017 13:14:51 +0200 Subject: [PATCH] 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 --- lib/awful/mouse/snap.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/awful/mouse/snap.lua b/lib/awful/mouse/snap.lua index 5109a1b8..e212d123 100644 --- a/lib/awful/mouse/snap.lua +++ b/lib/awful/mouse/snap.lua @@ -66,6 +66,7 @@ local function show_placeholder(geo) cr:stroke() placeholder_w.shape_bounding = img._native + img:finish() placeholder_w.visible = true end