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 <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-06-22 16:45:06 +02:00
parent 7b65f068a1
commit 2e0ea80cb3
1 changed files with 2 additions and 6 deletions

View File

@ -135,12 +135,8 @@ function new(screen, filter, buttons, style, template)
local data = setmetatable({}, { __mode = 'k' }) local data = setmetatable({}, { __mode = 'k' })
local u = function () tasklist_update(screen, w, buttons, filter, data, style, template) end local u = function () tasklist_update(screen, w, buttons, filter, data, style, template) end
for s = 1, capi.screen.count() do capi.screen[screen]:add_signal("tag::detach", u)
tag.attached_add_signal(s, "property::filtered", u) tag.attached_add_signal(screen, "property::selected", 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.client.add_signal("new", function (c) capi.client.add_signal("new", function (c)
c:add_signal("property::urgent", u) c:add_signal("property::urgent", u)
c:add_signal("property::floating", u) c:add_signal("property::floating", u)