diff --git a/lib/awful/widget/taglist.lua.in b/lib/awful/widget/taglist.lua.in index 4643423c..552316ee 100644 --- a/lib/awful/widget/taglist.lua.in +++ b/lib/awful/widget/taglist.lua.in @@ -9,8 +9,8 @@ local capi = { widget = widget, screen = screen, image = image, client = client } -local otable = require("otable") local type = type +local setmetatable = setmetatable local pairs = pairs local ipairs = ipairs local hooks = require("awful.hooks") @@ -48,7 +48,7 @@ function new(screen, label, buttons) ["right"] = 0}, ["bg_resize"] = true } - local data = otable() + local data = setmetatable({}, { __mode = 'k' }) local u = function (s) if s == screen then taglist_update(s, w, label, buttons, data, widgets) @@ -65,10 +65,6 @@ function new(screen, label, buttons) u(c.screen) end end) - -- Free data on tag removal - hooks.tags.register(function (s, tag, action) - if action == "remove" then data[tag] = nil end - end) u(screen) return w end