diff --git a/lib/awful/layout/init.lua.in b/lib/awful/layout/init.lua.in index 973926cbd..d30d7feeb 100644 --- a/lib/awful/layout/init.lua.in +++ b/lib/awful/layout/init.lua.in @@ -116,28 +116,21 @@ local function arrange_on_tagged(c, tag) end for s = 1, capi.screen.count() do + tag.attached_add_signal(s, "property::mwfact", arrange_prop) + tag.attached_add_signal(s, "property::nmaster", arrange_prop) + tag.attached_add_signal(s, "property::ncol", arrange_prop) + tag.attached_add_signal(s, "property::layout", arrange_prop) + tag.attached_add_signal(s, "property::windowfact", arrange_prop) + tag.attached_add_signal(s, "property::selected", arrange_prop) + tag.attached_add_signal(s, "tagged", arrange_prop) capi.screen[s]:add_signal("property::workarea", function(screen) arrange(screen.index) end) capi.screen[s]:add_signal("tag::attach", function (screen, tag) arrange(screen.index) - tag:add_signal("property::mwfact", arrange_prop) - tag:add_signal("property::nmaster", arrange_prop) - tag:add_signal("property::ncol", arrange_prop) - tag:add_signal("property::layout", arrange_prop) - tag:add_signal("property::windowfact", arrange_prop) - tag:add_signal("property::selected", arrange_prop) - tag:add_signal("tagged", arrange_on_tagged) end) capi.screen[s]:add_signal("tag::detach", function (screen, tag) arrange(screen.index) - tag:remove_signal("property::mwfact", arrange_prop) - tag:remove_signal("property::nmaster", arrange_prop) - tag:remove_signal("property::ncol", arrange_prop) - tag:remove_signal("property::layout", arrange_prop) - tag:remove_signal("property::windowfact", arrange_prop) - tag:remove_signal("property::selected", arrange_prop) - tag:remove_signal("tagged", arrange_on_tagged) end) capi.screen[s]:add_signal("padding", arrange) end