mirror of
https://github.com/vale981/bspwm
synced 2025-03-06 10:11:43 -05:00
List of leaves
This commit is contained in:
parent
d019d9ade6
commit
23bbc0e26f
2 changed files with 11 additions and 5 deletions
4
types.c
4
types.c
|
@ -6,7 +6,7 @@
|
||||||
Node *make_node(void)
|
Node *make_node(void)
|
||||||
{
|
{
|
||||||
Node *n = malloc(sizeof(Node));
|
Node *n = malloc(sizeof(Node));
|
||||||
n->parent = n->first_child = n->second_child = NULL;
|
n->parent = n->first_child = n->second_child = n->next_leaf = n->prev_leaf = NULL;
|
||||||
n->client = NULL;
|
n->client = NULL;
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,6 @@ Desktop *make_desktop(void)
|
||||||
{
|
{
|
||||||
Desktop *d = malloc(sizeof(Desktop));
|
Desktop *d = malloc(sizeof(Desktop));
|
||||||
d->name = NULL;
|
d->name = NULL;
|
||||||
d->previous = d->next = NULL;
|
d->prev = d->next = NULL;
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
12
types.h
12
types.h
|
@ -55,7 +55,10 @@ struct Node {
|
||||||
Node *first_child;
|
Node *first_child;
|
||||||
Node *second_child;
|
Node *second_child;
|
||||||
Node *parent;
|
Node *parent;
|
||||||
Client *client; /* equals NULL except for leaves */
|
/* the value of the following properties is NULL except for leaves: */
|
||||||
|
Client *client;
|
||||||
|
Node *prev_leaf;
|
||||||
|
Node *next_leaf;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct Rule Rule;
|
typedef struct Rule Rule;
|
||||||
|
@ -73,9 +76,12 @@ typedef struct Desktop Desktop;
|
||||||
struct Desktop {
|
struct Desktop {
|
||||||
char *name;
|
char *name;
|
||||||
Node *root;
|
Node *root;
|
||||||
|
Node *view; /* initially view = root, can be changed by zooming */
|
||||||
Node *focus;
|
Node *focus;
|
||||||
Node *prev_focus;
|
Node *last_focus;
|
||||||
Desktop *previous;
|
Node *head; /* first element in the list of leaves */
|
||||||
|
Node *tail;
|
||||||
|
Desktop *prev;
|
||||||
Desktop *next;
|
Desktop *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue