diff --git a/lib/awful/widget/tasklist.lua b/lib/awful/widget/tasklist.lua index a0605834..ccae7fa1 100644 --- a/lib/awful/widget/tasklist.lua +++ b/lib/awful/widget/tasklist.lua @@ -181,6 +181,9 @@ function tasklist.new(screen, filter, buttons, style, update_function, base_widg queued_update = true end end + function w._unmanage(c) + data[c] = nil + end if instances == nil then instances = {} 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("tagged", 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("focus", u) capi.client.connect_signal("unfocus", u)