mirror of
https://github.com/dylanaraps/sowm.git
synced 2026-11-19 19:51:05 +00:00
docs: update
This commit is contained in:
1 parent
9e9b6d5abb
commit
1d33b762eb
1 file changed
+4
-16
@@ -25,7 +25,7 @@ struct key {
|
|||||||
|
|
||||||
typedef struct client client;
|
typedef struct client client;
|
||||||
struct client{
|
struct client{
|
||||||
client *next, *prev;
|
client *next;
|
||||||
Window win;
|
Window win;
|
||||||
XWindowAttributes a;
|
XWindowAttributes a;
|
||||||
int f;
|
int f;
|
||||||
@@ -164,7 +164,6 @@ void win_add(Window w) {
|
|||||||
} else {
|
} else {
|
||||||
for (t=list;t->next;t=t->next);
|
for (t=list;t->next;t=t->next);
|
||||||
|
|
||||||
c->prev = t;
|
|
||||||
c->win = w;
|
c->win = w;
|
||||||
t->next = c;
|
t->next = c;
|
||||||
}
|
}
|
||||||
@@ -178,26 +177,15 @@ void win_del(Window w) {
|
|||||||
for WIN {
|
for WIN {
|
||||||
if (c->win != w) continue;
|
if (c->win != w) continue;
|
||||||
|
|
||||||
if (!c->prev && !c->next) {
|
if (!c->next && c == list) {
|
||||||
free(list);
|
free(list);
|
||||||
list = 0;
|
list = 0;
|
||||||
ws_save(desk);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!c->prev) {
|
} else if (c->next) {
|
||||||
list = c->next;
|
list = c->next;
|
||||||
c->next->prev = 0;
|
free(c);
|
||||||
|
|
||||||
} else if (!c->next) {
|
|
||||||
c->prev->next = 0;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
c->prev->next = c->next;
|
|
||||||
c->next->prev = c->prev;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
free(c);
|
|
||||||
ws_save(desk);
|
ws_save(desk);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user