move tclink in awesomeconf
This commit is contained in:
parent
899f84fce7
commit
14909f47a9
3
config.h
3
config.h
|
@ -210,7 +210,6 @@ typedef struct
|
||||||
XColor colors_urgent[ColLast];
|
XColor colors_urgent[ColLast];
|
||||||
/** Tag list */
|
/** Tag list */
|
||||||
Tag *tags;
|
Tag *tags;
|
||||||
TagClientLink *tclink;
|
|
||||||
/** Layout list */
|
/** Layout list */
|
||||||
Layout *layouts;
|
Layout *layouts;
|
||||||
/** Status bar */
|
/** Status bar */
|
||||||
|
@ -269,6 +268,8 @@ struct AwesomeConf
|
||||||
char *configpath;
|
char *configpath;
|
||||||
/** Selected clients on this tag */
|
/** Selected clients on this tag */
|
||||||
FocusList *focus;
|
FocusList *focus;
|
||||||
|
/** Link between tags and clients */
|
||||||
|
TagClientLink *tclink;
|
||||||
};
|
};
|
||||||
|
|
||||||
void config_parse(const char *);
|
void config_parse(const char *);
|
||||||
|
|
20
tag.c
20
tag.c
|
@ -32,15 +32,15 @@
|
||||||
extern AwesomeConf globalconf;
|
extern AwesomeConf globalconf;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
detach_tagclientlink(int screen, TagClientLink *tc)
|
detach_tagclientlink(TagClientLink *tc)
|
||||||
{
|
{
|
||||||
TagClientLink *tmp;
|
TagClientLink *tmp;
|
||||||
|
|
||||||
if(globalconf.screens[screen].tclink == tc)
|
if(globalconf.tclink == tc)
|
||||||
globalconf.screens[screen].tclink = tc->next;
|
globalconf.tclink = tc->next;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for(tmp = globalconf.screens[screen].tclink; tmp && tmp->next != tc; tmp = tmp->next);
|
for(tmp = globalconf.tclink; tmp && tmp->next != tc; tmp = tmp->next);
|
||||||
tmp->next = tc->next;
|
tmp->next = tc->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,11 +58,11 @@ tag_client(Client *c, Tag *t)
|
||||||
|
|
||||||
new_tc = p_new(TagClientLink, 1);
|
new_tc = p_new(TagClientLink, 1);
|
||||||
|
|
||||||
if(!globalconf.screens[c->screen].tclink)
|
if(!globalconf.tclink)
|
||||||
globalconf.screens[c->screen].tclink = new_tc;
|
globalconf.tclink = new_tc;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for(tc = globalconf.screens[c->screen].tclink; tc->next; tc = tc->next);
|
for(tc = globalconf.tclink; tc->next; tc = tc->next);
|
||||||
tc->next = new_tc;
|
tc->next = new_tc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,9 +75,9 @@ untag_client(Client *c, Tag *t)
|
||||||
{
|
{
|
||||||
TagClientLink *tc;
|
TagClientLink *tc;
|
||||||
|
|
||||||
for(tc = globalconf.screens[c->screen].tclink; tc; tc = tc->next)
|
for(tc = globalconf.tclink; tc; tc = tc->next)
|
||||||
if(tc->client == c && tc->tag == t)
|
if(tc->client == c && tc->tag == t)
|
||||||
detach_tagclientlink(c->screen, tc);
|
detach_tagclientlink(tc);
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
|
@ -88,7 +88,7 @@ is_client_tagged(Client *c, Tag *t)
|
||||||
if(!c)
|
if(!c)
|
||||||
return False;
|
return False;
|
||||||
|
|
||||||
for(tc = globalconf.screens[c->screen].tclink; tc; tc = tc->next)
|
for(tc = globalconf.tclink; tc; tc = tc->next)
|
||||||
if(tc->client == c && tc->tag == t)
|
if(tc->client == c && tc->tag == t)
|
||||||
return True;
|
return True;
|
||||||
return False;
|
return False;
|
||||||
|
|
Loading…
Reference in New Issue