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 <psychon@znc.in>
This commit is contained in:
parent
11216d8ca4
commit
0da790c026
|
@ -137,6 +137,7 @@ local function apply_shape(self)
|
||||||
s(cr, w, h, unpack(self._private.shape_args or {}))
|
s(cr, w, h, unpack(self._private.shape_args or {}))
|
||||||
cr:fill()
|
cr:fill()
|
||||||
wb.shape_bounding = img._native
|
wb.shape_bounding = img._native
|
||||||
|
img:finish()
|
||||||
|
|
||||||
-- The wibox background uses ARGB32 border so tooltip anti-aliasing works
|
-- The wibox background uses ARGB32 border so tooltip anti-aliasing works
|
||||||
-- when an external compositor is used. This will look better than
|
-- when an external compositor is used. This will look better than
|
||||||
|
|
Loading…
Reference in New Issue