diff --git a/lib/awful/widget/taglist.lua.in b/lib/awful/widget/taglist.lua.in index fd1927771..f98d37cfc 100644 --- a/lib/awful/widget/taglist.lua.in +++ b/lib/awful/widget/taglist.lua.in @@ -66,23 +66,15 @@ function new(screen, label, buttons) local uc = function (c) return u(c.screen) end capi.client.add_signal("focus", uc) capi.client.add_signal("unfocus", uc) + tag.attached_add_signal(screen, "property::selected", uc) + tag.attached_add_signal(screen, "property::icon", uc) + tag.attached_add_signal(screen, "property::hide", uc) capi.screen[screen]:add_signal("tag::attach", function(screen, tag) - taglist_update(s, w, label, buttons, data, widgets) - tag:add_signal("property::selected", uc) - tag:add_signal("property::icon", uc) - tag:add_signal("property::hide", uc) + u(screen.index) end) capi.screen[screen]:add_signal("tag::detach", function(screen, tag) - taglist_update(s, w, label, buttons, data, widgets) - tag:remove_signal("property::selected", uc) - tag:remove_signal("property::icon", uc) - tag:remove_signal("property::hide", uc) + u(screen.index) end) - for _, tag in ipairs(capi.screen[screen]:tags()) do - tag:add_signal("property::selected", uc) - tag:add_signal("property::icon", uc) - tag:add_signal("property::hide", uc) - end capi.client.add_signal("new", function(c) c:add_signal("property::urgent", uc) c:add_signal("property::screen", function(c)