diff --git a/lib/awful/widget/layoutbox.lua b/lib/awful/widget/layoutbox.lua index b328aee84..ce16de100 100644 --- a/lib/awful/widget/layoutbox.lua +++ b/lib/awful/widget/layoutbox.lua @@ -47,7 +47,7 @@ function layoutbox.new(screen) -- Do we already have the update callbacks registered? if boxes == nil then - boxes = setmetatable({}, { __mode = "v" }) + boxes = setmetatable({}, { __mode = "kv" }) tag.attached_connect_signal(nil, "property::selected", update_from_tag) tag.attached_connect_signal(nil, "property::layout", update_from_tag) layoutbox.boxes = boxes diff --git a/lib/awful/widget/taglist.lua b/lib/awful/widget/taglist.lua index 47ae781da..97ec52158 100644 --- a/lib/awful/widget/taglist.lua +++ b/lib/awful/widget/taglist.lua @@ -175,7 +175,7 @@ function taglist.new(screen, filter, buttons, style, update_function, base_widge end end if instances == nil then - instances = {} + instances = setmetatable({}, { __mode = "k" }) local function u(s) local i = instances[get_screen(s)] if i then diff --git a/lib/awful/widget/tasklist.lua b/lib/awful/widget/tasklist.lua index ed284da34..70a492077 100644 --- a/lib/awful/widget/tasklist.lua +++ b/lib/awful/widget/tasklist.lua @@ -190,7 +190,7 @@ function tasklist.new(screen, filter, buttons, style, update_function, base_widg data[c] = nil end if instances == nil then - instances = {} + instances = setmetatable({}, { __mode = "k" }) local function us(s) local i = instances[get_screen(s)] if i then