Merge pull request #1960 from psychon/fix-some-leaks

Fix some leaks
This commit is contained in:
Emmanuel Lepage Vallée 2017-08-07 14:36:08 -04:00 committed by GitHub
commit 90e8b67d37
5 changed files with 6 additions and 1 deletions

View File

@ -51,6 +51,8 @@ function shape.get_transformed(c, shape_name)
cr:set_source_surface(shape_img, border + l, border + t)
cr:rectangle(border + l, border + t, geom.width - l - r, geom.height - t - b)
cr:fill()
shape_img:finish()
end
if _shape then

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

View File

@ -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

View File

@ -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

View File

@ -272,7 +272,7 @@ local function new(args)
__newindex = function(self, k,v)
if rawget(self, "set_"..k) then
self["set_"..k](self, v)
elseif w[k] ~= nil or force_forward[k] then
elseif force_forward[k] or w[k] ~= nil then
w[k] = v
else
rawset(self, k, v)