From 7d32f7b733a502a4d58844649fc1faba8981f0a0 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 24 Jan 2016 16:28:07 +0100 Subject: [PATCH] tasklist: Unreference client in unmanage Signed-off-by: Uli Schlachter --- lib/awful/widget/tasklist.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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)