From 6a05197297cb2cba35f9034ddd2a046b641b5b9b Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 23 Jan 2008 08:45:02 +0100 Subject: [PATCH] add tag_view_byinde() --- tag.c | 13 +++++++++++++ tag.h | 1 + 2 files changed, 14 insertions(+) diff --git a/tag.c b/tag.c index 0c848139..7ed97906 100644 --- a/tag.c +++ b/tag.c @@ -293,6 +293,19 @@ tag_view_only(Tag *target) 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 tag_view_only_byindex(int screen, int dindex) { diff --git a/tag.h b/tag.h index f3d9bb48..f24d9e0b 100644 --- a/tag.h +++ b/tag.h @@ -29,6 +29,7 @@ Tag * tag_new(const char *, Layout *, double, int, int); void tag_view(Tag *, Bool); +void tag_view_byindex(int, int, Bool); void tag_push_to_screen(Tag *, int); Tag ** get_current_tags(int); void tag_client(Client *, Tag *);