From dd78f8e6f260f45dea9816c4fdb0add0c6752841 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 6 Mar 2016 11:38:52 +0100 Subject: [PATCH] Remove another useless iteration over screens Any signal on a screen instance is also emitted on the screen class, so the here can just connect to the screen class. Signed-off-by: Uli Schlachter --- lib/awful/layout/init.lua | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/awful/layout/init.lua b/lib/awful/layout/init.lua index dd81cba08..3c7546e37 100644 --- a/lib/awful/layout/init.lua +++ b/lib/awful/layout/init.lua @@ -238,14 +238,8 @@ capi.tag.connect_signal("property::useless_gap", arrange_tag) capi.tag.connect_signal("property::master_fill_policy", arrange_tag) capi.tag.connect_signal("tagged", arrange_tag) -for s = 1, capi.screen.count() do - capi.screen[s]:connect_signal("property::workarea", function(screen) - layout.arrange(screen) - end) - capi.screen[s]:connect_signal("padding", function (screen) - layout.arrange(screen) - end) -end +capi.screen.connect_signal("property::workarea", layout.arrange) +capi.screen.connect_signal("padding", layout.arrange) capi.client.connect_signal("raised", function(c) layout.arrange(c.screen) end) capi.client.connect_signal("lowered", function(c) layout.arrange(c.screen) end)