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);
if (head == NULL) {
c->next = NULL;
c->prev = NULL;
c->win = w;
head = c;
}
else {
for (t=head;t->next;t=t->next);
c->next = NULL;
c->prev = t;
c->win = w;
t->next = c;
}
c->next = NULL;
c->win = w;
cur = c;
}
@ -314,7 +312,8 @@ void win_del(Window w) {
client *c;
for(c=head;c;c=c->next) {
if (c->win == w) {
if (c->win != w) continue;
if (c->prev == NULL && c->next == NULL) {
free(head);
@ -347,7 +346,6 @@ void win_del(Window w) {
win_update();
return;
}
}
}
void ws_save(int i) {
@ -415,7 +413,7 @@ void wm_init() {
start.subwindow = None;
while(!XNextEvent(dis,&ev))
while(1 && !XNextEvent(dis,&ev))
if (events[ev.type]) events[ev.type](&ev);
}