tasklist: Unreference client in unmanage
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
69d96ba34d
commit
7d32f7b733
|
@ -181,6 +181,9 @@ function tasklist.new(screen, filter, buttons, style, update_function, base_widg
|
||||||
queued_update = true
|
queued_update = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
function w._unmanage(c)
|
||||||
|
data[c] = nil
|
||||||
|
end
|
||||||
if instances == nil then
|
if instances == nil then
|
||||||
instances = {}
|
instances = {}
|
||||||
local function us(s)
|
local function us(s)
|
||||||
|
@ -219,7 +222,14 @@ function tasklist.new(screen, filter, buttons, style, update_function, base_widg
|
||||||
capi.client.connect_signal("property::hidden", u)
|
capi.client.connect_signal("property::hidden", u)
|
||||||
capi.client.connect_signal("tagged", u)
|
capi.client.connect_signal("tagged", u)
|
||||||
capi.client.connect_signal("untagged", u)
|
capi.client.connect_signal("untagged", u)
|
||||||
capi.client.connect_signal("unmanage", u)
|
capi.client.connect_signal("unmanage", function(c)
|
||||||
|
u(c)
|
||||||
|
for s, i in pairs(instances) do
|
||||||
|
for _, tlist in pairs(i) do
|
||||||
|
tlist._unmanage(c)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
capi.client.connect_signal("list", u)
|
capi.client.connect_signal("list", u)
|
||||||
capi.client.connect_signal("focus", u)
|
capi.client.connect_signal("focus", u)
|
||||||
capi.client.connect_signal("unfocus", u)
|
capi.client.connect_signal("unfocus", u)
|
||||||
|
|
Loading…
Reference in New Issue