naughty.legacy: Explicitly remove the screen.

Do not rely on the GC. It isn't reliable with Luajit.
This commit is contained in:
Emmanuel Lepage Vallee 2021-09-20 15:53:51 -07:00
parent 87e09f81ab
commit 89c84caee4
1 changed files with 6 additions and 0 deletions

View File

@ -62,6 +62,12 @@ screen.connect_for_each_screen(function(s)
}
end)
capi.screen.connect_signal("removed", function(s)
timer.delayed_call(function()
current_notifications[s] = nil
end)
end)
--- Sum heights of notifications at position
--
-- @param s Screen to use