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;
|
tags = &globalconf.screens[(*c)->screen].tags;
|
||||||
luaA_otable_new(L);
|
lua_newtable(L);
|
||||||
for(int i = 0; i < tags->len; i++)
|
for(int i = 0; i < tags->len; i++)
|
||||||
if(is_client_tagged(*c, tags->tab[i]))
|
if(is_client_tagged(*c, tags->tab[i]))
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,6 +12,7 @@ local capi = { widget = widget,
|
||||||
local otable = otable
|
local otable = otable
|
||||||
local type = type
|
local type = type
|
||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
|
local ipairs = ipairs
|
||||||
local hooks = require("awful.hooks")
|
local hooks = require("awful.hooks")
|
||||||
local common = require("awful.widget.common")
|
local common = require("awful.widget.common")
|
||||||
local util = require("awful.util")
|
local util = require("awful.util")
|
||||||
|
@ -108,10 +109,17 @@ function label.all(t, args)
|
||||||
bg_color = bg_focus
|
bg_color = bg_focus
|
||||||
fg_color = fg_focus
|
fg_color = fg_focus
|
||||||
end
|
end
|
||||||
if sel and sel:tags()[t] then
|
if sel then
|
||||||
if taglist_squares_sel then
|
if taglist_squares_sel then
|
||||||
bg_image = capi.image(taglist_squares_sel)
|
-- Check that the selected clients is tagged with 't'.
|
||||||
bg_resize = taglist_squares_resize == "true"
|
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
|
end
|
||||||
else
|
else
|
||||||
local cls = t:clients()
|
local cls = t:clients()
|
||||||
|
|
|
@ -167,8 +167,13 @@ function label.currenttags(c, screen, args)
|
||||||
-- Only print client on the same screen as this widget
|
-- Only print client on the same screen as this widget
|
||||||
if c.screen ~= screen then return end
|
if c.screen ~= screen then return end
|
||||||
for k, t in ipairs(capi.screen[screen]:tags()) do
|
for k, t in ipairs(capi.screen[screen]:tags()) do
|
||||||
if t.selected and c:tags()[t] then
|
if t.selected then
|
||||||
return widget_tasklist_label_common(c, args)
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue