docs: update

This commit is contained in:
Dylan Araps 2019-10-11 22:33:01 +03:00
parent 8351d8c0dd
commit 1adf23af8c

12
sowm.c
View File

@ -97,21 +97,19 @@ void win_add(Window w) {
exit(1); exit(1);
if (head == NULL) { if (head == NULL) {
c->next = NULL;
c->prev = NULL; c->prev = NULL;
c->win = w;
head = c; head = c;
} }
else { else {
for (t=head;t->next;t=t->next); for (t=head;t->next;t=t->next);
c->next = NULL;
c->prev = t; c->prev = t;
c->win = w;
t->next = c; t->next = c;
} }
c->next = NULL;
c->win = w;
cur = c; cur = c;
} }
@ -314,7 +312,8 @@ void win_del(Window w) {
client *c; client *c;
for(c=head;c;c=c->next) { for(c=head;c;c=c->next) {
if (c->win == w) { if (c->win != w) continue;
if (c->prev == NULL && c->next == NULL) { if (c->prev == NULL && c->next == NULL) {
free(head); free(head);
@ -348,7 +347,6 @@ void win_del(Window w) {
return; return;
} }
} }
}
void ws_save(int i) { void ws_save(int i) {
desktops[i].mode = mode; desktops[i].mode = mode;
@ -415,7 +413,7 @@ void wm_init() {
start.subwindow = None; start.subwindow = None;
while(!XNextEvent(dis,&ev)) while(1 && !XNextEvent(dis,&ev))
if (events[ev.type]) events[ev.type](&ev); if (events[ev.type]) events[ev.type](&ev);
} }