shims: Always return something for c:tags()

This commit is contained in:
Emmanuel Lepage Vallee 2019-08-14 01:53:13 -04:00
parent 48f973f2eb
commit 44e6b2d24e
1 changed files with 9 additions and 0 deletions

View File

@ -34,6 +34,7 @@ function client.gen_fake(args)
ret.border_width = 1
ret.icon_sizes = {{16,16}}
ret.name = "Example Client"
ret.data._struts = { top = 0, right = 0, left = 0, bottom = 0 }
-- This is a hack because there's a `:is_transient_for(c2)` method
-- and a `transient_for` property. It will cause a stack overflow
@ -142,6 +143,14 @@ function client.gen_fake(args)
return {}
end
function ret:struts(new)
for k, v in pairs(new or {}) do
ret.data._struts[k] = v
end
return ret.data._struts
end
-- Record the geometry
ret._old_geo = {}
push_geometry(ret)