From 81b46f9694defc984a2ec119101cf3b7835cb0bb Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 11 Apr 2009 14:15:45 +0200 Subject: [PATCH] awful.widget.tasklist: remove otable usage Signed-off-by: Julien Danjou --- lib/awful/widget/tasklist.lua.in | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/awful/widget/tasklist.lua.in b/lib/awful/widget/tasklist.lua.in index 1551678c..221e40b6 100644 --- a/lib/awful/widget/tasklist.lua.in +++ b/lib/awful/widget/tasklist.lua.in @@ -8,8 +8,8 @@ local capi = { screen = screen, image = image, client = client } -local otable = require("otable") local ipairs = ipairs +local setmetatable = setmetatable local table = table local hooks = require("awful.hooks") local common = require("awful.widget.common") @@ -50,7 +50,7 @@ function new(label, buttons) bg_resize = true, bg_align = "right" } - local data = otable() + local data = setmetatable({}, { __mode = 'k' }) local u = function () tasklist_update(w, buttons, label, data, widgets) end hooks.arrange.register(u) hooks.clients.register(u) @@ -69,8 +69,6 @@ function new(label, buttons) end end) u() - -- Free data on unmanage - hooks.unmanage.register(function (c) data[c] = nil end) return w end