From 1306a543c287cf8e8cbe5c9f26e313a6bc9c2112 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sun, 20 Apr 2014 02:25:54 -0400 Subject: [PATCH] Use tag urgent::property instead of looping every clients in awful.widgets.taglist --- lib/awful/widget/taglist.lua.in | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) mode change 100644 => 100755 lib/awful/widget/taglist.lua.in diff --git a/lib/awful/widget/taglist.lua.in b/lib/awful/widget/taglist.lua.in old mode 100644 new mode 100755 index 97c0ab8a2..d08c329df --- a/lib/awful/widget/taglist.lua.in +++ b/lib/awful/widget/taglist.lua.in @@ -85,12 +85,9 @@ function taglist.taglist_label(t, args) if bg_empty then bg_color = bg_empty end if fg_empty then fg_color = fg_empty end end - for k, c in pairs(cls) do - if c.urgent then - if bg_urgent then bg_color = bg_urgent end - if fg_urgent then fg_color = fg_urgent end - break - end + if tag.getproperty(t, "urgent") then + if bg_urgent then bg_color = bg_urgent end + if fg_urgent then fg_color = fg_urgent end end end if t.selected then @@ -175,7 +172,7 @@ function taglist.new(screen, filter, buttons, style, update_function, base_widge tag.attached_connect_signal(screen, "property::activated", ut) tag.attached_connect_signal(screen, "property::screen", ut) tag.attached_connect_signal(screen, "property::index", ut) - capi.client.connect_signal("property::urgent", uc) + tag.attached_connect_signal(screen, "property::urgent", ut) capi.client.connect_signal("property::screen", function(c) -- If client change screen, refresh it anyway since we don't from -- which screen it was coming :-)