diff --git a/lib/awful/wibar.lua b/lib/awful/wibar.lua index 3ed9f0fa..9170d14a 100644 --- a/lib/awful/wibar.lua +++ b/lib/awful/wibar.lua @@ -359,11 +359,15 @@ function awfulwibar.new(arg) end capi.screen.connect_signal("removed", function(s) + local wibars = {} for _, wibar in ipairs(wiboxes) do if wibar._screen == s then - wibar:remove() + table.insert(wibars, wibar) end end + for _, wibar in ipairs(wibars) do + wibar:remove() + end end) function awfulwibar.mt:__call(...)