taglist: Stop updating after a screen was invalidated

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2016-05-01 19:38:40 +02:00
parent e4c3554c22
commit 5390913f5a
1 changed files with 6 additions and 1 deletions

View File

@ -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]