From 5390913f5ac5890a49191fbc0bea82689ea9a308 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 1 May 2016 19:38:40 +0200 Subject: [PATCH] taglist: Stop updating after a screen was invalidated Signed-off-by: Uli Schlachter --- lib/awful/widget/taglist.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/awful/widget/taglist.lua b/lib/awful/widget/taglist.lua index 97ec5215..df2b4eae 100644 --- a/lib/awful/widget/taglist.lua +++ b/lib/awful/widget/taglist.lua @@ -168,7 +168,9 @@ function taglist.new(screen, filter, buttons, style, update_function, base_widge -- Add a delayed callback for the first update. if not queued_update[screen] then timer.delayed_call(function() - taglist_update(screen, w, buttons, filter, data, style, uf) + if screen.valid then + taglist_update(screen, w, buttons, filter, data, style, uf) + end queued_update[screen] = false end) queued_update[screen] = true @@ -203,6 +205,9 @@ function taglist.new(screen, filter, buttons, style, update_function, base_widge capi.client.connect_signal("tagged", uc) capi.client.connect_signal("untagged", uc) capi.client.connect_signal("unmanage", uc) + capi.screen.connect_signal("removed", function(s) + instances[get_screen(s)] = nil + end) end w._do_taglist_update() local list = instances[screen]