From 55a097efc73ef9b841d14ed0a977212d3b6ecf51 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sun, 10 Nov 2019 21:04:04 -0500 Subject: [PATCH] client: Update existing code to use `property::active`. --- lib/awful/titlebar.lua | 3 +-- lib/awful/widget/taglist.lua | 3 +-- lib/awful/widget/tasklist.lua | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/awful/titlebar.lua b/lib/awful/titlebar.lua index d1a4070c..a1b86597 100644 --- a/lib/awful/titlebar.lua +++ b/lib/awful/titlebar.lua @@ -553,8 +553,7 @@ local function new(c, args) } -- Update the colors when focus changes - c:connect_signal("focus", update_colors) - c:connect_signal("unfocus", update_colors) + c:connect_signal("property::active", update_colors) -- Inform the drawable when it becomes invisible c:connect_signal("request::unmanage", function() diff --git a/lib/awful/widget/taglist.lua b/lib/awful/widget/taglist.lua index 9fc15388..5c35f200 100644 --- a/lib/awful/widget/taglist.lua +++ b/lib/awful/widget/taglist.lua @@ -539,8 +539,7 @@ function taglist.new(args, filter, buttons, style, update_function, base_widget) end local uc = function (c) return u(c.screen) end local ut = function (t) return u(t.screen) end - capi.client.connect_signal("focus", uc) - capi.client.connect_signal("unfocus", uc) + capi.client.connect_signal("property::active", uc) tag.attached_connect_signal(nil, "property::selected", ut) tag.attached_connect_signal(nil, "property::icon", ut) tag.attached_connect_signal(nil, "property::hide", ut) diff --git a/lib/awful/widget/tasklist.lua b/lib/awful/widget/tasklist.lua index 3c59d5db..8b49b6af 100644 --- a/lib/awful/widget/tasklist.lua +++ b/lib/awful/widget/tasklist.lua @@ -630,8 +630,7 @@ function tasklist.new(args, filter, buttons, style, update_function, base_widget end end) capi.client.connect_signal("list", u) - capi.client.connect_signal("focus", u) - capi.client.connect_signal("unfocus", u) + capi.client.connect_signal("property::active", u) capi.screen.connect_signal("removed", function(s) instances[get_screen(s)] = nil end)