shims: Always return something for c:tags()
This commit is contained in:
parent
48f973f2eb
commit
44e6b2d24e
|
@ -34,6 +34,7 @@ function client.gen_fake(args)
|
||||||
ret.border_width = 1
|
ret.border_width = 1
|
||||||
ret.icon_sizes = {{16,16}}
|
ret.icon_sizes = {{16,16}}
|
||||||
ret.name = "Example Client"
|
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
|
-- This is a hack because there's a `:is_transient_for(c2)` method
|
||||||
-- and a `transient_for` property. It will cause a stack overflow
|
-- and a `transient_for` property. It will cause a stack overflow
|
||||||
|
@ -142,6 +143,14 @@ function client.gen_fake(args)
|
||||||
return {}
|
return {}
|
||||||
end
|
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
|
-- Record the geometry
|
||||||
ret._old_geo = {}
|
ret._old_geo = {}
|
||||||
push_geometry(ret)
|
push_geometry(ret)
|
||||||
|
|
Loading…
Reference in New Issue