From aaea97610819ed586d9d1a0b080d25fcdc8217ed Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Thu, 2 Feb 2017 22:45:33 +0100 Subject: [PATCH] layoutbox: Update when a tag's screen changes (#1505) In theory it would be enough to only update the old and new screen of the tag whose screen changed. However, we cannot easily get the old screen, so just update all layoutboxes. Fixes: https://github.com/awesomeWM/awesome/issues/1503 Signed-off-by: Uli Schlachter --- lib/awful/widget/layoutbox.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/awful/widget/layoutbox.lua b/lib/awful/widget/layoutbox.lua index c5f8ed3ed..5c1df49e0 100644 --- a/lib/awful/widget/layoutbox.lua +++ b/lib/awful/widget/layoutbox.lua @@ -48,6 +48,13 @@ function layoutbox.new(screen) boxes = setmetatable({}, { __mode = "kv" }) capi.tag.connect_signal("property::selected", update_from_tag) capi.tag.connect_signal("property::layout", update_from_tag) + capi.tag.connect_signal("property::screen", function() + for s, w in pairs(boxes) do + if s.valid then + update(w, s) + end + end + end) layoutbox.boxes = boxes end