diff --git a/lib/awful/widget/taglist.lua b/lib/awful/widget/taglist.lua index 730afc89..6df04577 100644 --- a/lib/awful/widget/taglist.lua +++ b/lib/awful/widget/taglist.lua @@ -175,10 +175,10 @@ function taglist.new(screen, filter, buttons, style, update_function, base_widge tag.attached_connect_signal(screen, "property::screen", ut) tag.attached_connect_signal(screen, "property::index", ut) 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 :-) - u(screen) + capi.client.connect_signal("property::screen", function(c, old_screen) + if screen == c.screen or screen == old_screen then + u(screen) + end end) capi.client.connect_signal("tagged", uc) capi.client.connect_signal("untagged", uc) diff --git a/lib/awful/widget/tasklist.lua b/lib/awful/widget/tasklist.lua index c2cbb4dd..3c2e9fb7 100644 --- a/lib/awful/widget/tasklist.lua +++ b/lib/awful/widget/tasklist.lua @@ -160,7 +160,11 @@ function tasklist.new(screen, filter, buttons, style, update_function, base_widg capi.client.connect_signal("property::icon_name", u) capi.client.connect_signal("property::icon", u) capi.client.connect_signal("property::skip_taskbar", u) - capi.client.connect_signal("property::screen", u) + capi.client.connect_signal("property::screen", function(c, old_screen) + if screen == c.screen or screen == old_screen then + u() + end + end) capi.client.connect_signal("property::hidden", u) capi.client.connect_signal("tagged", u) capi.client.connect_signal("untagged", u)