From 9a42ae87cfc683d0388c4a44199d903214d1839e Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 1 May 2016 10:12:04 +0200 Subject: [PATCH] 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 --- lib/awful/wibox.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/awful/wibox.lua b/lib/awful/wibox.lua index e98a65fbb..9cc1e18a9 100644 --- a/lib/awful/wibox.lua +++ b/lib/awful/wibox.lua @@ -285,6 +285,14 @@ end capi.client.connect_signal("property::struts", 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(...) return awfulwibox.new(...) end