add tag_view_byinde()

This commit is contained in:
Julien Danjou 2008-01-23 08:45:02 +01:00
parent 1cc5a2a1f8
commit 6a05197297
2 changed files with 14 additions and 0 deletions

13
tag.c
View File

@ -293,6 +293,19 @@ tag_view_only(Tag *target)
tag_view(target, True); tag_view(target, True);
} }
void
tag_view_byindex(int screen, int dindex, Bool view)
{
Tag *tag;
if(dindex < 0)
return;
for(tag = globalconf.screens[screen].tags; tag && dindex > 0;
tag = tag->next, dindex--);
tag_view(tag, view);
}
void void
tag_view_only_byindex(int screen, int dindex) tag_view_only_byindex(int screen, int dindex)
{ {

1
tag.h
View File

@ -29,6 +29,7 @@
Tag * tag_new(const char *, Layout *, double, int, int); Tag * tag_new(const char *, Layout *, double, int, int);
void tag_view(Tag *, Bool); void tag_view(Tag *, Bool);
void tag_view_byindex(int, int, Bool);
void tag_push_to_screen(Tag *, int); void tag_push_to_screen(Tag *, int);
Tag ** get_current_tags(int); Tag ** get_current_tags(int);
void tag_client(Client *, Tag *); void tag_client(Client *, Tag *);