tests: Add client:kill() to the shims.

This commit is contained in:
Emmanuel Lepage Vallee 2019-07-18 00:18:36 -04:00
parent a18348542c
commit d3a0dcffcd
1 changed files with 21 additions and 0 deletions

View File

@ -101,6 +101,27 @@ function client.gen_fake(args)
--TODO --TODO
end end
function ret:kill()
local old_tags = ret:tags() or {}
for k, c in ipairs(clients) do
if c == ret then
ret:emit_signal("unmanaged", c)
ret.valid = false
table.remove(clients, k)
break
end
end
ret._tags = {}
for _, t in ipairs(old_tags) do
ret:emit_signal("untagged", t)
t:emit_signal("property::tags")
end
assert(not ret.valid)
end
titlebar_meta(ret) titlebar_meta(ret)
function ret:tags(new) --FIXME function ret:tags(new) --FIXME