From 2e0ea80cb3ee5aa7006a6f48fce4d15c551b51ab Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Tue, 22 Jun 2010 16:45:06 +0200 Subject: [PATCH] Tasklist: Listen to the correct signals The tasklist shouldn't care about the tag history or new tags showing up and it also shouldn't care about tags disappearing on other screens (on the current screen the tasklist needs to update because the tag might have been selected). On the other hand, the tasklist really should care about tags being selected and unselected. This worked before because this causes changes to the focus history. Signed-off-by: Uli Schlachter --- lib/awful/widget/tasklist.lua.in | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/awful/widget/tasklist.lua.in b/lib/awful/widget/tasklist.lua.in index e41c405cf..dd813e6ef 100644 --- a/lib/awful/widget/tasklist.lua.in +++ b/lib/awful/widget/tasklist.lua.in @@ -135,12 +135,8 @@ function new(screen, filter, buttons, style, template) local data = setmetatable({}, { __mode = 'k' }) local u = function () tasklist_update(screen, w, buttons, filter, data, style, template) end - for s = 1, capi.screen.count() do - tag.attached_add_signal(s, "property::filtered", u) - capi.screen[s]:add_signal("tag::attach", u) - capi.screen[s]:add_signal("tag::detach", u) - capi.screen[s]:add_signal("tag::history::update", u) - end + capi.screen[screen]:add_signal("tag::detach", u) + tag.attached_add_signal(screen, "property::selected", u) capi.client.add_signal("new", function (c) c:add_signal("property::urgent", u) c:add_signal("property::floating", u)