rename prev to next
This commit is contained in:
parent
bdd474348b
commit
7caa03acdd
4
config.h
4
config.h
|
@ -205,9 +205,11 @@ typedef struct FocusList FocusList;
|
||||||
struct FocusList
|
struct FocusList
|
||||||
{
|
{
|
||||||
Client *client;
|
Client *client;
|
||||||
FocusList *prev;
|
FocusList *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DO_SLIST(FocusList, focus, p_delete);
|
||||||
|
|
||||||
/** Tag type */
|
/** Tag type */
|
||||||
typedef struct Tag Tag;
|
typedef struct Tag Tag;
|
||||||
struct Tag
|
struct Tag
|
||||||
|
|
12
focus.c
12
focus.c
|
@ -31,7 +31,7 @@ focus_get_node_by_client(Client *c)
|
||||||
{
|
{
|
||||||
FocusList *fl;
|
FocusList *fl;
|
||||||
|
|
||||||
for(fl = globalconf.focus; fl; fl = fl->prev)
|
for(fl = globalconf.focus; fl; fl = fl->next)
|
||||||
if(fl->client == c)
|
if(fl->client == c)
|
||||||
return fl;
|
return fl;
|
||||||
|
|
||||||
|
@ -44,11 +44,11 @@ focus_detach_node(FocusList *fl)
|
||||||
FocusList *tmp;
|
FocusList *tmp;
|
||||||
|
|
||||||
if(globalconf.focus == fl)
|
if(globalconf.focus == fl)
|
||||||
globalconf.focus = fl->prev;
|
globalconf.focus = fl->next;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for(tmp = globalconf.focus; tmp && tmp->prev != fl; tmp = tmp->prev);
|
for(tmp = globalconf.focus; tmp && tmp->next != fl; tmp = tmp->next);
|
||||||
tmp->prev = fl->prev;
|
tmp->next = fl->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
return fl;
|
return fl;
|
||||||
|
@ -61,7 +61,7 @@ focus_attach_node(FocusList *fl)
|
||||||
|
|
||||||
old_head = globalconf.focus;
|
old_head = globalconf.focus;
|
||||||
globalconf.focus = fl;
|
globalconf.focus = fl;
|
||||||
fl->prev = old_head;
|
fl->next = old_head;
|
||||||
|
|
||||||
return fl;
|
return fl;
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ focus_get_latest_client_for_tags(Tag **t, int nindex)
|
||||||
Tag **tags;
|
Tag **tags;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
for(fl = globalconf.focus; fl; fl = fl->prev)
|
for(fl = globalconf.focus; fl; fl = fl->next)
|
||||||
if(fl->client && !fl->client->skip)
|
if(fl->client && !fl->client->skip)
|
||||||
for(tags = t; *tags; tags++)
|
for(tags = t; *tags; tags++)
|
||||||
if(is_client_tagged(fl->client, *tags))
|
if(is_client_tagged(fl->client, *tags))
|
||||||
|
|
Loading…
Reference in New Issue