awful.wibox: Handle screen removal

When a screen is removed, awful.wibox now hides all wiboxes that it created for
this screen.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2016-05-01 10:12:04 +02:00
parent ac81a8df1f
commit 9a42ae87cf
1 changed files with 8 additions and 0 deletions

View File

@ -285,6 +285,14 @@ end
capi.client.connect_signal("property::struts", update_wiboxes_on_struts) capi.client.connect_signal("property::struts", update_wiboxes_on_struts)
capi.client.connect_signal("unmanage", update_wiboxes_on_struts) capi.client.connect_signal("unmanage", update_wiboxes_on_struts)
capi.screen.connect_signal("removed", function(s)
for _, wprop in ipairs(wiboxes) do
if wprop.screen == s then
wprop.wibox.visible = false
end
end
end)
function awfulwibox.mt:__call(...) function awfulwibox.mt:__call(...)
return awfulwibox.new(...) return awfulwibox.new(...)
end end