Ignore desktop clients on taglist widget

Make the taglist widget skip unstickied and focused desktop clients
for status update by:
 * Ignoring focused client if it is of desktop type
 * Returning a list of clients from tag.clients without clients
   of desktop type.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
David Palacio 2011-10-04 10:30:28 -05:00 committed by Uli Schlachter
parent cc0fc99a2c
commit 8fd3182869
2 changed files with 3 additions and 1 deletions

View File

@ -128,7 +128,7 @@ 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 then if sel and sel.type ~= "desktop" then
if taglist_squares_sel then if taglist_squares_sel then
-- Check that the selected clients is tagged with 't'. -- Check that the selected clients is tagged with 't'.
local seltags = sel:tags() local seltags = sel:tags()

2
tag.c
View File

@ -397,6 +397,8 @@ luaA_tag_clients(lua_State *L)
lua_createtable(L, clients->len, 0); lua_createtable(L, clients->len, 0);
for(i = 0; i < clients->len; i++) for(i = 0; i < clients->len; i++)
{ {
if(clients->tab[i]->type == WINDOW_TYPE_DESKTOP)
continue;
luaA_object_push(L, clients->tab[i]); luaA_object_push(L, clients->tab[i]);
lua_rawseti(L, -2, i + 1); lua_rawseti(L, -2, i + 1);
} }