From ce19cabae30a9c32e0f7e2e9f7f014673d509055 Mon Sep 17 00:00:00 2001 From: Arvydas Sidorenko Date: Sat, 16 Jun 2012 13:23:00 +0200 Subject: [PATCH] Fixed bug with global `tags` in rc.lua awful.wibox.tasklist was overwritting `tags` variable breaking all the functionality which uses it. Signed-off-by: Arvydas Sidorenko Signed-off-by: Uli Schlachter --- awesomerc.lua.in | 2 +- lib/awful/widget/tasklist.lua.in | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/awesomerc.lua.in b/awesomerc.lua.in index da88e2019..bfc5791ee 100644 --- a/awesomerc.lua.in +++ b/awesomerc.lua.in @@ -71,7 +71,7 @@ local layouts = -- {{{ Tags -- Define a tag table which hold all screen tags. -local tags = {} +tags = {} for s = 1, screen.count() do -- Each screen has its own tag table. tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1]) diff --git a/lib/awful/widget/tasklist.lua.in b/lib/awful/widget/tasklist.lua.in index 35946e5b7..39dc6249f 100644 --- a/lib/awful/widget/tasklist.lua.in +++ b/lib/awful/widget/tasklist.lua.in @@ -167,7 +167,7 @@ function tasklist.filter.currenttags(c, screen) if c.screen ~= screen then return false end -- Include sticky client too if c.sticky then return true end - tags = capi.screen[screen]:tags() + local tags = capi.screen[screen]:tags() for k, t in ipairs(tags) do if t.selected then local ctags = c:tags() @@ -192,7 +192,7 @@ function tasklist.filter.minimizedcurrenttags(c, screen) if c.sticky then return true end -- Check client is minimized if not c.minimized then return false end - tags = capi.screen[screen]:tags() + local tags = capi.screen[screen]:tags() for k, t in ipairs(tags) do -- Select only minimized clients if t.selected then