client: stop using otable
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
b14036171d
commit
6430738f17
2
client.c
2
client.c
|
@ -1322,7 +1322,7 @@ luaA_client_tags(lua_State *L)
|
|||
}
|
||||
|
||||
tags = &globalconf.screens[(*c)->screen].tags;
|
||||
luaA_otable_new(L);
|
||||
lua_newtable(L);
|
||||
for(int i = 0; i < tags->len; i++)
|
||||
if(is_client_tagged(*c, tags->tab[i]))
|
||||
{
|
||||
|
|
|
@ -12,6 +12,7 @@ local capi = { widget = widget,
|
|||
local otable = otable
|
||||
local type = type
|
||||
local pairs = pairs
|
||||
local ipairs = ipairs
|
||||
local hooks = require("awful.hooks")
|
||||
local common = require("awful.widget.common")
|
||||
local util = require("awful.util")
|
||||
|
@ -108,10 +109,17 @@ function label.all(t, args)
|
|||
bg_color = bg_focus
|
||||
fg_color = fg_focus
|
||||
end
|
||||
if sel and sel:tags()[t] then
|
||||
if sel then
|
||||
if taglist_squares_sel then
|
||||
-- Check that the selected clients is tagged with 't'.
|
||||
local seltags = sel:tags()
|
||||
for _, v in ipairs(seltags) do
|
||||
if v == t then
|
||||
bg_image = capi.image(taglist_squares_sel)
|
||||
bg_resize = taglist_squares_resize == "true"
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
local cls = t:clients()
|
||||
|
|
|
@ -167,10 +167,15 @@ function label.currenttags(c, screen, args)
|
|||
-- Only print client on the same screen as this widget
|
||||
if c.screen ~= screen then return end
|
||||
for k, t in ipairs(capi.screen[screen]:tags()) do
|
||||
if t.selected and c:tags()[t] then
|
||||
if t.selected then
|
||||
local ctags = c:tags()
|
||||
for _, v in ipairs(ctags) do
|
||||
if v == t then
|
||||
return widget_tasklist_label_common(c, args)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
Loading…
Reference in New Issue