From 0da790c026e658d0c7c56c687bc8b535c90c977f Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Fri, 4 Aug 2017 13:16:12 +0200 Subject: [PATCH] awful.tooltip: Finish temporary image For setting the shape of the tooltip, this code creates an image surface describing the wanted shape. After this commit, this image surface is finished when it is no longer needed. This results in most of the image's memory to be freed 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 --- lib/awful/tooltip.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/awful/tooltip.lua b/lib/awful/tooltip.lua index 74a03b6f2..5978ce588 100644 --- a/lib/awful/tooltip.lua +++ b/lib/awful/tooltip.lua @@ -137,6 +137,7 @@ local function apply_shape(self) s(cr, w, h, unpack(self._private.shape_args or {})) cr:fill() wb.shape_bounding = img._native + img:finish() -- The wibox background uses ARGB32 border so tooltip anti-aliasing works -- when an external compositor is used. This will look better than