From 0f2db7653dad20507fc9621da9a14eee8cecb936 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 14 Nov 2007 10:00:05 +0100 Subject: [PATCH] introduce new tag_client_with_current_selected() function to tag a client with currently selected tags --- tag.c | 9 +++++++++ tag.h | 1 + 2 files changed, 10 insertions(+) diff --git a/tag.c b/tag.c index fd7a6c03..8525bf88 100644 --- a/tag.c +++ b/tag.c @@ -49,6 +49,15 @@ isvisible(Client * c, int screen, Tag * tags, int ntags) return False; } +void +tag_client_with_current_selected(Client *c, awesome_config *awesomeconf) +{ + int i; + + p_realloc(&c->tags, awesomeconf->ntags); + for(i = 0; i < awesomeconf->ntags; i++) + c->tags[i] = awesomeconf->tags[i].selected; +} /** Tag selected window with tag * \param arg Tag name diff --git a/tag.h b/tag.h index 4922b9da..14bc2a8e 100644 --- a/tag.h +++ b/tag.h @@ -28,6 +28,7 @@ #define IS_TILED(client, screen, tags, ntags) (client && !client->isfloating && isvisible(client, screen, tags, ntags)) Bool isvisible(Client *, int, Tag *, int); +void tag_client_with_current_selected(Client *, awesome_config *); UICB_PROTO(uicb_tag); UICB_PROTO(uicb_togglefloating);