introduce new tag_client_with_current_selected() function to tag a client with currently selected tags

This commit is contained in:
Julien Danjou 2007-11-14 10:00:05 +01:00
parent 98c869c8f3
commit 0f2db7653d
2 changed files with 10 additions and 0 deletions

9
tag.c
View File

@ -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

1
tag.h
View File

@ -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);